src/Warden/Warden.php
public static function webRoutes()
    {
        Route::group([
            'namespace'  => 'Kregel\\Warden\\Http\\Controllers',
            'prefix'     => config('kregel.warden.route'),
            'as'         => 'warden::',
            'middleware' => config('kregel.warden.auth.middleware'),
        ], function ($router) {
            Route::get('/', function () {
                return view('warden::base');
            });

            Route::get('{model}/manage/new', ['as' => 'new-model', 'uses' => 'ModelController@getNewModel']);
            Route::get('{model}s/manage', ['as' => 'models', 'uses' => 'ModelController@getModelList']);
            Route::get('{model}/manage/{id}', ['as' => 'model', 'uses' => 'ModelController@getModel']);
        });
    }
public static function webRoutes()
    {
        Route::group([
            'namespace'  => 'Kregel\\Warden\\Http\\Controllers',
            'prefix'     => config('kregel.warden.route'),
            'as'         => 'warden::',
            'middleware' => config('kregel.warden.auth.middleware'),
        ], function ($router) {
            Route::get('/', function () {
                return view('warden::base');
            });

            Route::get('{model}/manage/new', ['as' => 'new-model', 'uses' => 'ModelController@getNewModel']);
            Route::get('{model}s/manage', ['as' => 'models', 'uses' => 'ModelController@getModelList']);
            Route::get('{model}/manage/{id}', ['as' => 'model', 'uses' => 'ModelController@getModel']);
        });
    }
public static function webRoutes ( ) { Route :: group ( [ 'namespace' => 'Kregel\\Warden\\Http\\Controllers' , 'prefix' => config ( 'kregel.warden.route' ) , 'as' => 'warden::' , 'middleware' => config ( 'kregel.warden.auth.middleware' ) , ] , function ( $ router ) { Route :: get ( '/' , function ( ) { return view ( 'warden::base' ) ; } ) ; Route :: get ( '{model}/manage/new' , [ 'as' => 'new-model' , 'uses' => 'ModelController@getNewModel' ] ) ; Route :: get ( '{model}s/manage' , [ 'as' => 'models' , 'uses' => 'ModelController@getModelList' ] ) ; Route :: get ( '{model}/manage/{id}' , [ 'as' => 'model' , 'uses' => 'ModelController@getModel' ] ) ; } ) ; }
Define the web routes more dynamically.
Define the web routes more dynamically .