diff --git a/LJPcCalendarModule/Http/routes.php b/LJPcCalendarModule/Http/routes.php index 80c700b..687442e 100644 --- a/LJPcCalendarModule/Http/routes.php +++ b/LJPcCalendarModule/Http/routes.php @@ -1,11 +1,11 @@ 'web', 'prefix' => Helper::getSubdirectory(), 'namespace' => 'Modules\LJPcCalendarModule\Http\Controllers' ], function () { - Route::get( '/calendar', [ 'uses' => 'LJPcCalendarModuleController@index' ] )->name( 'ljpccalendarmodule.index' ); - Route::get( '/calendar/ajax', [ 'uses' => 'LJPcCalendarModuleController@getItems' ] )->name( 'ljpccalendarmodule.ajax' ); - Route::post( '/calendar/ajax', [ 'uses' => 'LJPcCalendarModuleController@ajax' ] )->name( 'ljpccalendarmodule.ajax' ); + Route::get( '/calendar', [ 'uses' => 'LJPcCalendarModuleController@index', 'middleware' => [ 'auth', 'roles' ], 'roles' => [ 'user', 'admin' ] ] )->name( 'ljpccalendarmodule.index' ); + Route::get( '/calendar/ajax', [ 'uses' => 'LJPcCalendarModuleController@getItems', 'middleware' => [ 'auth', 'roles' ], 'roles' => [ 'user', 'admin' ] ] )->name( 'ljpccalendarmodule.ajax' ); + Route::post( '/calendar/ajax', [ 'uses' => 'LJPcCalendarModuleController@ajax', 'middleware' => [ 'auth', 'roles' ], 'roles' => [ 'user', 'admin' ] ] )->name( 'ljpccalendarmodule.ajax' ); } ); Route::group( [ 'prefix' => Helper::getSubdirectory(), 'namespace' => 'Modules\LJPcCalendarModule\Http\Controllers' ], function () { - Route::get( '/calendar/{id}', [ 'uses' => 'LJPcCalendarModuleController@export' ] )->name( 'ljpccalendarmodule.external' ); + Route::get( '/calendar/{id}', [ 'uses' => 'LJPcCalendarModuleController@export' ] )->name( 'ljpccalendarmodule.external' ); } );