function something($p)
    {
        Mail::send('view', array(
            "email" => $p->email
        ), function ( $message) 
        {
            $message->to($p->email, $p->name)->subject('hello');
        })
    }
怎么在laravel框架下Mail::send的第三个参数闭包内访问闭包外的变量?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
function () use ($var) {http://php.net/manual/en/functions.anonymous.php#example-186