diff --git a/src/LaravelFilemanagerServiceProvider.php b/src/LaravelFilemanagerServiceProvider.php index b57de295..316c84fe 100644 --- a/src/LaravelFilemanagerServiceProvider.php +++ b/src/LaravelFilemanagerServiceProvider.php @@ -38,7 +38,7 @@ public function boot() ], 'lfm_handler'); if (config('lfm.use_package_routes')) { - Route::group(['prefix' => 'filemanager', 'middleware' => ['web', 'auth']], function () { + Route::group(['prefix' => config('prefix') ?: 'filemanger', 'middleware' => config('lfm.middlewares') ?: ['web','auth'] ], function () { \UniSharp\LaravelFilemanager\Lfm::routes(); }); } diff --git a/src/config/lfm.php b/src/config/lfm.php index c831d069..b8b109dd 100644 --- a/src/config/lfm.php +++ b/src/config/lfm.php @@ -17,6 +17,18 @@ 'use_package_routes' => true, + + /** + / Customize middlewares when use use_package_routes + */ + 'middlewares' => [], + + + /** + / Customize prefix when use use_package_routes + */ + 'prefix' => 'filemanger', + /* |-------------------------------------------------------------------------- | Shared folder / Private folder