Ravi Teja

Route Group in Laravel

Chain attributes in route group

An example has not been documented about laravel route grouping. You can chain attributes in an array like this.

Route::group([
  'middleware' => ['admin'],
  'as' => 'admin.',
  'namespace' => 'Admin',
  'prefix' => 'admin'
], function () {
  Route::get('/', 'DashboardController@index')->name('dashboard');
});

#laravel
#code