PHP code example of wallacemaxters / blade-petite-vue

1. Go to this page and download the library: Download wallacemaxters/blade-petite-vue library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wallacemaxters / blade-petite-vue example snippets


<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>