Open khalyomede opened 2 years ago
Yes, I haven't been able to test and modify for Laravel 9. I hope I have the time to do so soon!
Just released an update for PHP8. The package is no longer Laravel only, it can be used in any PHP project. I did add a "Usage in Laravel" guide in the README.
Hlo TaffoVelikoff,
This issue still exists. It works fine in local, but in production it is showing this error. Error:
Class "TaffoVelikoff\ImageKitAdapter\ImageKitAdapter" not found
I fixed the issue. Instead of boot method, we should be registering the adapter in the register method. this is for Laravel.
public function register(): void { $this->app->bind(ImagekitAdapter::class, function ($app, $config) { return new ImagekitAdapter( new ImageKit( config('filesystems.disks.imagekit.public_key'), config('filesystems.disks.imagekit.private_key'), config('filesystems.disks.imagekit.endpoint_url') ) ); }); Storage::extend('imagekit', function ($app, $config) { $adapter = $app->make(ImagekitAdapter::class); return new FilesystemAdapter( new Filesystem($adapter, $config), $adapter, $config ); }); }
I tried to use the package with Laravel 9.15.1 / PHP 8.1.5, and it thrown this exception when I ran:
I guess this package has been tested with Flysystem v1, but Laravel 9 uses v3