1.8 KiB
1.8 KiB
Documents
Requirements
- php >= 5.5
- Laravel 5
- requires intervention/image (to make thumbs, crop and resize images).
Notes
- For
laravel 5.2andlaravel 5.3, please set'middlewares' => ['web', 'auth'],in config/lfm.php - With laravel-filemanager >= 1.3.0, the new configs
valid_image_mimetypesandvalid_file_mimetypesrestrict the MIME types of the uploading files.
Installation
-
Install package
composer require unisharp/laravel-filemanager -
Edit
config/app.php:Add service providers
Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider::class, Intervention\Image\ImageServiceProvider::class,And add class aliases
'Image' => Intervention\Image\Facades\Image::class,Code above is for Laravel 5.1. In Laravel 5.0 should leave only quoted class names.
-
Publish the package's config and assets :
php artisan vendor:publish --tag=lfm_config php artisan vendor:publish --tag=lfm_public -
Ensure that the files & images directories (in
config/lfm.php) are writable by your web server.