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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -