[Vuejs]-Vue-Router breaks when reloading page with laravel-6

1👍

Make sure you use route history, like this

const router = new VueRouter({
  mode: 'history',
});

Everything that is not matched in previous routes will be served by the AppController, which returns the naked view that contains the files for bootstrapping the VueJS application. In your web routes put this one on the bottom of all your routes

 Route::get('/{path}', 'AppController@index')->where( 'path', "([A-z\d\-/_.]+)?" );

see this article catch routes

Leave a comment