Skip to content

Commit d0d0396

Browse files
committed
fix registering package routes
1 parent 4d1d712 commit d0d0396

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/LaravelFilemanagerServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public function boot()
3535
$this->publishes([
3636
__DIR__.'/Handlers/LfmConfigHandler.php' => base_path('app/Handlers/LfmConfigHandler.php'),
3737
], 'lfm_handler');
38+
39+
if(config('lfm.use_package_routes')) {
40+
\UniSharp\LaravelFilemanager\Lfm::routes();
41+
}
3842
}
3943

4044
/**

src/Lfm.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ public static function routes()
242242
{
243243
$middleware = [ CreateDefaultFolder::class, MultiUser::class ];
244244
$as = 'unisharp.lfm.';
245+
$prefix = config('lfm.url_prefix');
245246

246-
Route::group(compact('middleware', 'as'), function () {
247+
Route::group(compact('middleware', 'as', 'prefix'), function () {
247248
$namespace = '\\UniSharp\\LaravelFilemanager\\Controllers\\';
248249

249250
// display main layout

0 commit comments

Comments
 (0)