jhull
1 week ago
20
0
Vue

Vue-router 404s on Dynamic Route IDs

Posted 1 week ago by jhull

Brand new install of Laravel 6, VueJS, Spark, etc.

Trying to get dynamic routes to work:

{ path: '/books/:slug', component: Book }

with this in the web.php:

Route::get('/{vue_capture?}', '[email protected]');

And HomeController is:

public function vue() { return view('app'); }

Based on this in Laracasts: Setting up Vue-Router with Spark

and it 404s on any dynamic attempt /books/foo or /books/bar 404s every time.

Please sign in or create an account to participate in this conversation.