I'm using Laravel 5.4
and vue-js 2.4
Laravel routes
Route::get('/', 'HomeController@home');
HomeController
public function home(Request $request) {
return view('app');
}
Vue router
const routes = [
{ path: '/', name: 'home', component: App},
{ path: '/about', component: About },
];
When I click on this, about
component is well displayed and the url is example.com/about
<router-link to="/about">About</router-link>
Issue
When I enter example.com/about
, I'm redirected to the home page of my vue app which is example.com
.
What should I do so the about
can reach vue-router
?
/about
? – Joseph Silber/about
– Léo Coco