qcod / laravel-app-settings

Store settings in database with a manager UI for your Laravel app
MIT License
338 stars 53 forks source link

ENV Override #17

Closed LadyNay closed 5 years ago

LadyNay commented 5 years ago

Hi there, I was wondering if you have a way to override env settings with your plugin? I have tried numerous ways but in vain. I don't want my client to have to change the env for mail settings for example, but when I use the method it still pulls it from the ENV file. Do you perhaps have detailed documentation for this?

saqueib commented 5 years ago

I would say apply these email settings in AppServiceProvider@boot method

/**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Config::set('mail.from.address', setting('email'));
        Config::set('mail.from.name', setting('from_email_name'))
    }

try this and let me know

LadyNay commented 5 years ago

Thank you for the above it works 100%