php - How to Map new route to specific old route in Laravel? -


i have following route group admin panel

route::prefix('admin')->group(function (){ . . .} 

i want wrap route new route e.g asda12asda

so old behavior :

/admin/users 

is changed :

/asda12asda/users 

not allowing old route. don't want change internally system , want find efficient laravel way achieve it.

redirect old route new route

route::prefix('admin')->group(function (){         route::any('login', function () {         // redirect new route         redirect()->route('new route');     }); }); 

by creating new route , mapping accordingly

route::prefix('asda12asda')->group(function () {     route::any('login', function () {         // whatever     })->name('new route'); }); 

Comments

Popular posts from this blog

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -