Skip to content

Commit 01b6b7a

Browse files
committed
fix failure when uploading files
1 parent 11d3ba6 commit 01b6b7a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/LaravelFilemanagerServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace UniSharp\LaravelFilemanager;
44

5+
use Illuminate\Support\Facades\Route;
56
use Illuminate\Support\ServiceProvider;
67

78
/**
@@ -37,7 +38,9 @@ public function boot()
3738
], 'lfm_handler');
3839

3940
if (config('lfm.use_package_routes')) {
40-
\UniSharp\LaravelFilemanager\Lfm::routes();
41+
Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () {
42+
\UniSharp\LaravelFilemanager\Lfm::routes();
43+
});
4144
}
4245
}
4346

src/Lfm.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,8 @@ public static function routes()
243243
{
244244
$middleware = [ CreateDefaultFolder::class, MultiUser::class ];
245245
$as = 'unisharp.lfm.';
246-
$prefix = config('lfm.url_prefix');
247246

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

251250
// display main layout

0 commit comments

Comments
 (0)