Laravel 5.8 only return the view of SPA for any route.
Iam building a crud with Laravel 5.8 + vue and I want to define 2 routes in routes/web.php the first route return SPA vue app the second instead it returns a collection of new App\User instances.
When I try call crud.test/users laravel return SPA crud again and the second route never execute.
But If I remove the first route crud.test/users works.
Route::get('{path}', function () {
return view('spa');
})->where('path', '(.*)');
Route::get('/users', function () {
return factory('App\User', 10)->make();
});
I expect to laravel returnme array of 10 Users