This package is an upgraded version of TaffoVelikoff/imagekit-adapter that supports Laravel 9 and Flysystem 3.
You can install the package via composer:
composer require phuclh/flysystem-imagekit
You can publish the config file with:
php artisan vendor:publish --tag="flysystem-imagekit-config"
First you will need to sing up for an ImageKit account. Then go https://imagekit.io/dashboard#developers to get your public key, private key and url endpoint. Add the following to your .env file:
IMAGEKIT_PUBLIC=your_public_key
IMAGEKIT_PRIVATE=your_public_key
IMAGEKIT_ENDPOINT=https://ik.imagekit.io/your_id
// Upload file (second argument can be an url, file or base64)
Storage::disk('imagekit')->put('filename.jpg', 'https://mysite.com/my_image.com');
// Get file
Storage::disk('imagekit')->get('filename.jpg');
// Delete file
Storage::disk('imagekit')->delete('filename.jpg');
// List all files
Storage::disk('imagekit')->listContents('', false); // listContents($path, $deep)
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.