I have setup vue-router successfully but I have some problem mixing it with my laravel 5.3 routes.
I have a php route for home:
Route::get(\'/\', arr
try this this may solve your problem
export var router = new Router({
hashbang: false,
history: true,
linkActiveClass: 'active',
mode: 'html5'
});
router.map({
'/': {
name: 'home',
component: Home
},
'/dashboard': {
name: 'dashboard',
component: Dashboard
},
'/404notfound': {
name: 'pagenotfound',
component: Pagenotfound
}
});
// For every new route scroll to the top of the page
router.beforeEach(function() {
window.scrollTo(0, 0);
});
// If no route is matched redirect home
router.redirect({
'*': '/404notfound'
});