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

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -