Skip to content

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
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments