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

Exception : Driver "" not available #4

Open
anassbaba opened this issue May 17, 2021 · 2 comments
Open

Exception : Driver "" not available #4

anassbaba opened this issue May 17, 2021 · 2 comments

Comments

@anassbaba
Copy link

at /var/dev/jibly/vendor/francescomalatesta/laravel-amplitude/src/AmplitudeFactory.php:23

  19|
  20|     public function makeFor($driverName)
  21|     {
  22|         if (!in_array($driverName, array_keys($this->driversMap))) {
> 23|             throw new \Exception(sprintf('Driver "%s" not available', $driverName));
  24|         }
  25|
  26|         $driver = $this->driversMap[$driverName];
  27|         return new Amplitude($driver);

"php": "^7.2",
"laravel/framework": "^6.2",

@prestonojb
Copy link

Hi @anassbaba, try publishing the "LaravelAmplitude\Providers\LaravelAmplitudeServiceProvider" file with
php artisan vendor:publish and the exception should be resolved.

@hashcode7
Copy link

I have fixed this by adding a default driver so composer will not fail when installing the package.

You can use the following forked package instead that has this fix and also supports Php8 and Laravel9.

https://github.com/hashcode7/laravel-amplitude-analytics

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

3 participants