blue32a / laravel-intervention-image
Bind Intervention Image to Laravel.
v1.0.0
2024-01-01 11:49 UTC
Requires
- php: ^8.1
- illuminate/support: ^9.0|^10.0
- intervention/image: ^3.2
Requires (Dev)
README
Bind Intervention Image to Laravel.
Installation
Install by running the following command.
composer require blue32a/laravel-intervention-image
Publish the configuration file by running the following command.
php artisan vendor:publish --tag=intervention-image
Register a service provider in the config/app.php
configuration file.
'providers' => ServiceProvider::defaultProviders()->merge([ Blue32a\Laravel\Intervention\Image\ImageServiceProvider::class, // ... ])->toArray(),
Example
The manager instance is injected as shown in the following code.
namespace App\Http\Controllers; use Intervention\Image\ImageManager; class ImageController extends Controller { public function index(ImageManager $manager) { // ... } }