- php >= 5.4
- exif extension
- fileinfo extension
- GD Library >=2.0 or Imagick PHP extension >=6.5.7
- Laravel 5
- requires intervention/image (to make thumbs, crop and resize images).
-
Run these lines
composer require mafftor/laravel-file-manager php artisan vendor:publish --tag=lfm_config php artisan vendor:publish --tag=lfm_public php artisan storage:link
-
Edit
APP_URL
in.env
.
-
Install package
composer require mafftor/laravel-file-manager
-
(optional) Edit
config/app.php
:* For Laravel 5.5 and up, skip to step 3. All service providers and facades are automatically discovered.
Add service providers
Mafftor\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
-
(optional) Run commands to clear cache :
php artisan route:clear php artisan config:clear
-
Ensure that the files & images directories (in
config/lfm.php
) are writable by your web server (run commands likechown
orchmod
). -
Create symbolic link :
php artisan storage:link
-
Edit
APP_URL
in.env
.
- Run
composer require mafftor/laravel-file-manager:dev-master
to get the latest developer version.
-
Check the integration document to see how to apply this package.
-
Check the config document to discover the flexibility of this package.