简体   繁体   中英

Problem with Voyager admin panel routing and Vue js router in laravel

I`m developing locally SPA application using Vuejs V2 in Laravel V8 framework.
My routes/web.php file have this codes:

 Route::group(['prefix' => 'admin'], function () { Voyager::routes(); }); //for disallow accessing route from anywhere alse than api Route::get('/{any?}', function () { return view('welcome'); })->where('any', '^(?!api\\/)[\\/\\w\\.\\,-]*'); Auth::routes();

Here is my routes.js file inside resources/js folder

import VueRouter from "vue-router"; const routes = [ { path: "*", component: require("./components/PageNotFound").default, name: "PageNotFound" }, { path: "/", component: require("./components/Home").default, name: "home" }, // other routes ]; const router = new VueRouter({ mode: "history", linkActiveClass: "active", routes }); export default router;

My problem is that i cant access Voyager http://127.0.0.1:8000/admin route in browser and redirects me to home page!
My Voyager installed successfully and before installing that i was developing frontend features so i have a lot routes in my routes.js file.
My question is how i can except Voyager admin group route in web.php or any other solutions maybe?!

我通过停止服务然后开始服务解决了这个问题,为我工作,我现在可以看到管理面板。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM