2017-07-01 2 views
0

Kann ich legte eine ENV Variable aus config\mail.php solche hier/*Laravel Mail-Methode()

|-------------------------------------------------------------------------- 
| Global "From" Address 
|-------------------------------------------------------------------------- 
| 
| You may wish for all e-mails sent by your application to be sent from 
| the same address. Here, you may specify a name and address that is 
| used globally for all e-mails that are sent by your application. 
| 
*/ 

'from' => [ 
    'address' => env('MAIL_FROM_ADDRESS', '[email protected]****.com'), 
    'name' => env('MAIL_FROM_NAME', '****'), 
], 

Weil ich eine Nachricht von einem Kontakt-Formular in meiner Laravel App zu bauen versucht, und ich möchte

verwenden
public function build() 
    { 
     return $this->from()->view('email.contact'); 
    } 

mit einer dynamischen Variable in von Verfahren, aber ich mag dieses Problem beheben ...:/

möglich ist oder nicht?

Bester Bezug

Antwort

0

Ich bin nicht sicher, die Frage zu verstehen, aber Sie können Ihre „config email“ wie folgt verwenden:

config('mail.from.address') 
+0

dank ich es versuchen! –