Skip to content

Commit

Permalink
Protected the routes with middlewares and added middleware option in …
Browse files Browse the repository at this point in the history
…config
  • Loading branch information
mjawad096 committed Oct 25, 2022
1 parent b0009fd commit e51133f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@

'expose_api' => false,

/*
|--------------------------------------------------------------------------
| Routes
|--------------------------------------------------------------------------
|
| Routes Settings
|
*/

'routes' => [
'middleware' => [
'web', 'auth',
],
],

/*
|--------------------------------------------------------------------------
| Force Class
Expand Down
2 changes: 1 addition & 1 deletion src/routes/laravel-grapesjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Route::prefix('laravel-grapesjs')
->name('laravel-grapesjs.')
->middleware('web')
->middleware(config('laravel-grapesjs.routes.middleware', []))
->namespace('Dotlogics\Grapesjs\App\Http\Controllers')
->group(function(){
Route::post('asset/store', 'AssetController@store')->name('asset.store');
Expand Down

0 comments on commit e51133f

Please sign in to comment.