Routes
-
Edit
routes/web.php
:Create route group to wrap package routes.
Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () { \UniSharp\LaravelFilemanager\Lfm::routes(); });
Make sure
auth
middleware is present to :- prevent unauthorized uploads
- work properly with multi-user mode
-
Make sure urls below is correspond to your route (remember to include type parameter
?type=Images
or?type=Files
) :- CKEditor
CKEDITOR.replace('editor', { filebrowserImageBrowseUrl: '/your-custom-route?type=Images', filebrowserBrowseUrl: '/your-custom-route?type=Files' });
- TinyMCE
... var cmsURL = editor_config.path_absolute + 'your-custom-route?field_name='+field_name+'&lang='+ tinymce.settings.language; if (type == 'image') { cmsURL = cmsURL + "&type=Images"; } else { cmsURL = cmsURL + "&type=Files"; } ...
- CKEditor
Views
Copy views to resources/views/vendor/unisharp/laravel-filemanager/
:
php artisan vendor:publish --tag=lfm_view
Translations
- Copy
vendor/unisharp/laravel-filemanager/src/lang/en
to/resources/lang/vendor/laravel-filemanager/<YOUR LANGUAGE>/lfm.php
. - Edit the file as you please.