laravel-vue-cli-3 icon indicating copy to clipboard operation
laravel-vue-cli-3 copied to clipboard

Routes not working with Nova

Open lamalamaMark opened this issue 6 years ago • 1 comments

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

lamalamaMark avatar Aug 22 '18 21:08 lamalamaMark

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?

bcorcoran avatar Aug 24 '18 03:08 bcorcoran