diff --git a/src/config.php b/src/config.php index 0020881..34354f5 100644 --- a/src/config.php +++ b/src/config.php @@ -13,6 +13,21 @@ 'expose_api' => false, + /* + |-------------------------------------------------------------------------- + | Routes + |-------------------------------------------------------------------------- + | + | Routes Settings + | + */ + + 'routes' => [ + 'middleware' => [ + 'web', 'auth', + ], + ], + /* |-------------------------------------------------------------------------- | Force Class diff --git a/src/routes/laravel-grapesjs.php b/src/routes/laravel-grapesjs.php index fcf7b02..d873209 100644 --- a/src/routes/laravel-grapesjs.php +++ b/src/routes/laravel-grapesjs.php @@ -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');