0π
use spa pattern.
in spa only one time your index.blade.php file load then load .vue
fileso how example: this is your index.blade.php file
@extends('layouts.master')
@section('content')
<body id="vue_root">
<vue-router></vue-router>
</body>
@endsection
this is your hotel.vue file where
list,add,edit,delete functionality
this is your room.vue file where
book room,check room available ,etc. functionality.
now if you click on hotel link then just load hotel.vue file with his functionality
and send ajax request to server(hotelcontroller) and get hotel list with response in json ..(not reload whole just reload element)if u click in room link then load only room.vue file with his
functionality and load room dependency ..(not reload whole just reload
element)using vue-router in vue u can do like thisβ¦β¦
- [Vuejs]-Nuxt JS / Vue JS search filter not working
- [Vuejs]-Cordova β Device Orientation events no trigger
Source:stackexchange.com