【发布时间】:2021-04-21 06:42:38
【问题描述】:
我是 vuejs 的新手,我正在准备一个 laravel 7 多重身份验证工作。在这项工作中,我使用 vuejs 做前端部分。问题是路由部分:
Route::get('/{any}/', 'Front\IndexController@index')->where('any', '. *');
当我将其写入routes \ web 并输入localhost:8000/admin 或localhost:8000/admin/register 时,管理页面不会出现,但当我输入localhost:8000/login 或localhost:8000/register 时没有问题。
如果我删除路由部分,则管理页面正在工作,但这次 vuejs 路由在我刷新页面时会给出 404 错误。
我们不能这样做吗:
Route::get('/{any}/', 'Front\IndexController@index')->where('any', '. *-Not-> /admin/ and /admin/login/ and /admin/register and /admin/index and /admin/user etc.');
我根据这个项目做的工作: https://github.com/samironbarai/laravel-7-multi-auth.git
【问题讨论】:
标签: php laravel vue.js authentication