Hello @datlechin I think that you load the data from the database (I can't see the code behind the settings classes) and that means it is needed to have a database with the settings in your Github workflow.
Because the composer scripts also execute an artisan command you need to have the database setup before any composer install.
Personally I shouldn't load this in a service provider. That means it is executed on every request/command/scheduled task. You can create a server that configure the settings before it is needed. (like loading and configure the mail settings before sending mail)
Another question is: does it really change so much that you can't use the .env for this config? It looks a lot more complicated.
ps. Can you post the code next time in the post and not an image?
ngoquocdat liked this reply
Thank you, I think so, I shouldn’t load it in serviceprovider.
tvbeek liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community