phuclh / flysystem-imagekit
A flysystem driver for Imagekit
Installs: 1 519
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 6
Requires
- php: ^8.1
- illuminate/contracts: ^9.0
- imagekit/imagekit: ^2.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-10-09 07:32:40 UTC
README
This package is an upgraded version of TaffoVelikoff/imagekit-adapter that supports Laravel 9 and Flysystem 3.
Installation
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"
Setup
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
Usage
// 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)
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.