1.0.81 • Published 5 years ago

lavutils v1.0.81

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

lavutils

Object Oriented Vue Instance Manipulation, with Laravel in mind.

SETUP

  1. Let's start from a fresh Laravel project and work directly from a project that has scaffolded the Vue UI with authentication:
    laravel new Project

    cd Project

    composer require laravel/ui --dev

    php artisan ui vue --auth

    npm install lavutils

    npm run watch

If you already have a project, then simply run:

    npm install lavutils
  1. In the app.js file, replace the default Vue Instance with the following:
    FROM:

// resources/js/app.js

    const app = new Vue({
        el: '#app',
    });
    TO:

// resources/js/app.js

    import lavutils from 'lavutils'

    window.lavutils = lavutils
  1. Remove "defer" from the header script tag of you app layout blade.

    From:

    <script src="{{ asset('js/app.js') }}" defer></script>

    To:

    <script src="{{ asset('js/app.js') }}"></script>

  2. Instantiate the Vue instance with a separate script tag at the bottom of the body.

    <script> lavutils.instantiate() </script>

1.0.81

5 years ago

1.0.8

5 years ago

1.0.2

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago