From 2e75024c682eab141a67a3ed3132cec4170eea85 Mon Sep 17 00:00:00 2001 From: Stream Date: Wed, 17 Apr 2024 12:07:14 +0800 Subject: [PATCH] docs: update installation document with instructions for intervention/image v3 --- docs/installation.md | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index d003e251..67a2fd41 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -25,25 +25,16 @@ composer require unisharp/laravel-filemanager ``` -1. (optional) Edit `config/app.php` : +1. (optional) Install required dependency with `v3.*` of `intervention/image`: - \* *For Laravel 5.5 and up, skip to step 3. All service providers and facades are automatically discovered.* + This package use `intervention/image` to perform image cropping/resizing and generating thumbnails. Since `v3.*` of `intervention/image` does not support Laravel by default, the service provider need to be installed with the following scripts. - Add service providers - - ```php - UniSharp\LaravelFilemanager\LaravelFilemanagerServiceProvider::class, - Intervention\Image\ImageServiceProvider::class, - ``` - - And add class aliases - - ```php - 'Image' => Intervention\Image\Facades\Image::class, + ```bash + composer require intervention/image-laravel + php artisan vendor:publish --provider="Intervention\Image\Laravel\ServiceProvider" ``` - Code above is for Laravel 5.1. - In Laravel 5.0 should leave only quoted class names. + \* *Do not run these scripts if you use `v2.*` of `intervention/image`.* 1. Publish the package's config and assets :