Support the ongoing development of Laravel.io →
posted 1 year ago
Laravel
0
moderator

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?

datlechin liked this reply

1

Thank you, I think so, I shouldn’t load it in serviceprovider.

tvbeek liked this reply

1

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.