wallacemaxters/blade-petite-vue

A small wrapper to usage petite-vue with Laravel Blade

0.2.0 2024-04-09 01:28 UTC

This package is auto-updated.

Last update: 2024-11-09 02:56:33 UTC


README

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>