Named Route Groups

Route::get('admin/home',['as' => 'home',function(){
   echo 'admin home';
}]);


// view 
echo route('home'); // output : http://localhost/admin/home
Route::group(['prefix' => 'admin'],function(){
Route::get('home',['as' => 'home',function(){
   echo 'admin home';
}]);
 });

// view 
echo route('home'); // output : http://localhost/admin/home
Route::group(['prefix' => 'admin','as' => 'admin'],function(){
Route::get('home',['as' => 'home',function(){
   echo 'admin home';
}]);
 });

// view 
echo route('admin.home'); // output : http://localhost/admin/home

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

DMCA.com Protection Status