codestudiohq / laravel-totem

Manage Your Laravel Schedule From A Web Dashboard
MIT License
1.78k stars 224 forks source link

Laravel Totem Initiates Database Connection During Package Discovery #385

Open jevgenijsblaus opened 1 month ago

jevgenijsblaus commented 1 month ago

Hello,

I've encountered an issue with the Laravel Totem package while developing with Laravel. Totem attempts to establish a database connection when running the @php artisan package:discover --ansi command during Composer's post-autoload-dump scripts.

This behavior results in an error when the database (in my case, an SQLite database) does not yet exist:

Illuminate\Database\QueryException
Database file at path [/app/database/database.sqlite] does not exist. Ensure this is an absolute path to the database.

Could there perhaps be a way to delay Totem's database connection to a point where the entire application is fully set up and the database is guaranteed to be ready for a connection request?

Thank you for your help and consideration.

toshiakikohama commented 1 week ago

I have same issue anyone knows about it? I'd like to solve it as soon as i can