Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ddelnano's avatar

Migration Issues After Adding package to laravel app

So I recently just finished an API I was writing for my mobile app and I was waiting to integrate Oauth2 for my authentication layer. I added the "lucadegasperi/oauth2-server-laravel" => "3.*"
package from composer (https://github.com/lucadegasperi/oauth2-server-laravel) and I followed the instructions on how to integrate it. This included adding the following Service Providers: 'LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider', 'LucaDegasperi\OAuth2Server\OAuth2ServerServiceProvider', I am familiar with all of the above, however, the final step was to publish the package and run its migrations via php artisan config:publish lucadegasperi/oauth2-server-laravel php artisan oauth2-server:migrations
When I ran the migrations I checked my laravel Homestead database for the addititonal oauth tables from the package but I could not find them. Then I tried to rerun my migrations and that's when I realized I was getting a [PDOException] SQLSTATE[HY000] [2002] No such file or directory from outside my virtual machine (my laptop running Homestead) and a [InvalidArgumentException] Database [development] not configured. while sshed into the Homestead VM. I am very lost since my database configuration was fine before this. Any help or insight would be greatly appreciated.

0 likes
0 replies

Please or to participate in this conversation.