Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver [bunnycdn] is not supported. #65

Open
hammertime-red opened this issue Aug 2, 2023 · 3 comments
Open

Driver [bunnycdn] is not supported. #65

hammertime-red opened this issue Aug 2, 2023 · 3 comments

Comments

@hammertime-red
Copy link

hammertime-red commented Aug 2, 2023

Got this error:

Driver [bunnycdn] is not supported.

at .....\vendor\laravel\framework\src\Illuminate\Filesystem\FilesystemManager.php:149
145▕
146▕ $driverMethod = 'create'.ucfirst($name).'Driver';
147▕
148▕ if (! method_exists($this, $driverMethod)) {
➜ 149▕ throw new InvalidArgumentException("Driver [{$name}] is not supported.");
150▕ }
151▕
152▕ return $this->{$driverMethod}($config);
153▕ }

I did everything according to the documentation
Laravel Framework 9.52.4

@kitro
Copy link

kitro commented Aug 21, 2023

Make sure the you add bunnycdn to config/filesystems.php, and extend the Storage facade in AppServiceProvider.

And run php artisan config:clear just to make sure is not a cache issue.

@calvez
Copy link

calvez commented Nov 20, 2024

after some pain here an example what is ok for me

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {

        Storage::extend('bunnycdn', function (Application $app, array $config) {
            $adapter = new BunnyCDNAdapter(
                new BunnyCDNClient(
                    env('BUNNYCDN_STORAGE_ZONE'),
                    env('BUNNYCDN_API_KEY'),
                    BunnyCDNRegion::FALKENSTEIN
                ),
                env('BUNNYCDN_PULL_ZONE_URL')
            );

            return new FilesystemAdapter(
                new Filesystem($adapter, $config),
                $adapter,
                $config
            );
        });
    }```

@sifex
Copy link
Collaborator

sifex commented Nov 21, 2024

@calvez what ended up being painful, this looks similar to the one found on the README.md guide, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants