How to use database for mail settings in Laravel

后端 未结 4 830
伪装坚强ぢ
伪装坚强ぢ 2021-02-06 15:51

I\'d like to keep users away from editing configuration files, so I\'ve made web interface in admin panel for setting up Mail server, username, password, port, encryption.. I w

4条回答
  •  故里飘歌
    2021-02-06 16:45

    I configured as mentioned, however got the following error. While I tried your code found that from Laravel 5.4 share method is deprecated and instead informed to use singleton.

    Call to undefined method Illuminate\Foundation\Application::share()

    here is the below method using singleton instead using share method:

    protected function registerSwiftTransport(){
        $this->app->singleton('swift.transport', function ($app){
            return new CustomTransportManager($app);
        });
    }
    

提交回复
热议问题