Skip to content

wallacemaxters/blade-petite-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WallaceMaxters/BladePetiteVue

Use petite-vue with Blade views in Laravel

<html>

<head>

@petitevue
</head>

<body>
  <x-petite-vue :props="['name' => 'Wallace']">
      The current url is:
      <span x-text="$page.url" />

      My name is @{{ name }} 

      This is another value @{{ anotherValue }}

      <button @@click="changeName"></button>

      <x-slot :script>
        <script>
        function (props) {
          return {
            ...props,
            anotherValue: 5,
            changeName() {
              this.name = 'Maxters';
            }
          }
        }
        </script>
      </x-slot>
  </x-petite-vue>
</body>
</html>

About

Use petite-vue with Blade views in Laravel

Topics

Resources

Stars

Watchers

Forks