VUE JS Install

After install laravel open command line and run this command "npm install" to install  node js ...... 

After install npm you can find a new folder named "node_modules" in root folder.

After Install npm Started work in this file "resources/js/app.js"

Create A New route (invoke)

Route::get('/customers','CustomerController@index')->name('customer-list');

Open the app.blade.php file (layouts/app.blade.php) keep at footer .

>> Open resource/js/components folder & create a new components - CustomerComponent.vue

CustomerComponent.vue


    
       

 

 

My First VUE JS

 

 

 

 


    


 

 

 

Open app.js file (resource/js/app.js) and include the new vue js file .....

Vue.component('customer-component', require('./components/CustomerComponent.vue').default);

Open view file and include the component (resorce/views/customer-list.blade.php)

@extends('layouts.app')

@section('content')

customer-component> /customer-component>
@endsection

after finished the step open command line & run

"npm run dev to run" to view the vue file and reload the window ..

then hard reload your page to see new changes

Run Vue Js