Route::group PHP Method

group() public static method

Create a route group with shared attributes.
public static group ( array $attributes, Closure $callback ) : void
$attributes array
$callback Closure
return void
        public static function group($attributes, $callback)
        {
            \Illuminate\Routing\Router::group($attributes, $callback);
        }

Usage Example

 public static function returnRoutes()
 {
     $class = __CLASS__;
     Route::group(array('before' => 'auth', 'prefix' => 'admin'), function () use($class) {
         Route::resource('questions', $class, array('except' => array('show'), 'names' => array('index' => 'questions.index', 'create' => 'questions.create', 'store' => 'questions.store', 'edit' => 'questions.edit', 'update' => 'questions.update', 'destroy' => 'questions.destroy')));
     });
 }
All Usage Examples Of Route::group