This can help you.
https://dev.to/aaronreddix/how-to-integrate-firebase-with-laravel-11-496j
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to connect a Laravel web application to Firebase, but I've run into difficulties. Specifically, I followed a tutorial and installed the necessary package (kreait/laravel-firebase), but I’m unable to establish a connection.
This can help you.
https://dev.to/aaronreddix/how-to-integrate-firebase-with-laravel-11-496j
@php artisan package:discover --ansi <php
return [ 'credentials' => [ 'path' => 'my-firebase-app\firebase-credentials.json', 'credentials' => [ 'path' => 'my-firebase-app\firebase-credentials.json', 'path' => 'my-firebase-app\firebase-credentials.json', ], ], ]; ]; Illuminate\Contracts\Container\BindingResolutionException Illuminate\Contracts\Container\BindingResolutionException
Target class [files] does not exist. Target class [files] does not exist.
at vendor\laravel\framework\src\Illuminate\Container\Container.php:946 at vendor\laravel\framework\src\Illuminate\Container\Container.php:946 942▕ 943▕ try { 942▕ 943▕ try { 944▕ $reflector = new ReflectionClass($concrete); 945▕ } catch (ReflectionException $e) { 943▕ try { 944▕ $reflector = new ReflectionClass($concrete); 945▕ } catch (ReflectionException $e) { ➜ 946▕ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); 947▕ } 944▕ $reflector = new ReflectionClass($concrete); 945▕ } catch (ReflectionException $e) { ➜ 946▕ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); 947▕ } 948▕ ➜ 946▕ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); 947▕ } 948▕ 949▕ // If the type is not instantiable, the developer is attempting to resolve 947▕ } 948▕ 949▕ // If the type is not instantiable, the developer is attempting to resolve 950▕ // an abstract type such as an Interface or Abstract Class and there is
949▕ // If the type is not instantiable, the developer is attempting to resolve
950▕ // an abstract type such as an Interface or Abstract Class and there is
1 [internal]:0 950▕ // an abstract type such as an Interface or Abstract Class and there is
1 [internal]:0 Illuminate\Foundation\Application::Illuminate\Foundation{closure}(Object(Illuminate\Foundation\Support\Providers\EventServiceProvider), "Illuminate\Foundation\Support\Providers\EventServiceProvider") 1 [internal]:0 Illuminate\Foundation\Application::Illuminate\Foundation{closure}(Object(Illuminate\Foundation\Support\Providers\EventServiceProvider), "Illuminate\Foundation\Support\Providers\EventServiceProvider") Illuminate\Foundation\Application::Illuminate\Foundation{closure}(Object(Illuminate\Foundation\Support\Providers\EventServiceProvider), "Illuminate\Foundation\Support\Providers\EventServiceProvider")
2 vendor\laravel\framework\src\Illuminate\Container\Container.php:944
2 vendor\laravel\framework\src\Illuminate\Container\Container.php:944 ReflectionException::("Class "files" does not exist") ReflectionException::("Class "files" does not exist")
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
how do i solve this error
@vincent15000 Why is there no provider array in my app.php?
@nazreen-cod I don't have any provider array in my app.php file either. Why would you need this array ?
@nazreen-cod I never used this command.
php artisan package:discover --ansi
@vincent15000 because by following the website that you gave me. the second step for Integrating Firebase into Laravel i need to open app.php in config folder and add the service provider to the providers array:
'providers' => [
// ...
App\Providers\FirebaseServiceProvider::class,
],
@nazreen-cod You can declare your own service provider in the providers.php file in the bootstrap folder.
https://laravel.com/docs/11.x/providers#writing-service-providers
@nazreen-cod because this is an old tutorial
Please or to participate in this conversation.