Nublust
755
8
Laravel

Service provider and db query

Posted 3 years ago by Nublust

Is it possible to use eloquent and query my database in a service providers boot method?

I'm trying to use envoyer, but when it installs the composer dependencies and runs php artisan clear-compiled, the deployment breaks:

[Illuminate\Database\QueryException]                                                                                        
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'forge.countries' doesn't exist (SQL: select * from `countries`)  

Am I doing something obviously wrong?

Please sign in or create an account to participate in this conversation.