laravel-vue-cli-3
laravel-vue-cli-3 copied to clipboard
Routes not working with Nova
When you use the whitelist route in routes/web.php it is not possible to access the API routes created by Nova. These can be excluded by using
Route::get('/{any}', 'SpaController@index')->where('any', '^(?!nova-api).*$');
instead of
Route::get('/{any}', 'SpaController@index')->where('any', '.*');
Added a Pull request: https://github.com/yyx990803/laravel-vue-cli-3/pull/9
Just figured this out myself as well.
I am using
Route::get('/{any}', 'SpaController@index')->where('any', '\#*');
Is there any reason to have anything that doesn't start with "#" routed to the controller?