function something($p) { mail::send('view', array( email => $p->email ), function ( $message) { $message->to($p->email, $p->name)->subject('hello'); }) }
怎么在laravel框架下mail::send的第三个参数闭包内访问闭包外的变量?
回复内容: function something($p) { mail::send('view', array( email => $p->email ), function ( $message) { $message->to($p->email, $p->name)->subject('hello'); }) }
怎么在laravel框架下mail::send的第三个参数闭包内访问闭包外的变量?
function () use ($var) {
http://php.net/manual/en/functions.anonymous.php#example-186
如何在 laravel 中使用 smtp 发送邮件(适用于 163、qq、gmail 等)