在我的 laravel 应用程序中,我创建了一个用于发送电子邮件的助手。
助手代码:
public static function send_email($page,$subject,$email,$email_data) {
try {
$site_url=url('/');
$email_data['site_url'] = $site_url;
Mail::queue($page, array('email_data' => $email_data), function ($message) use ($email, $subject) {
$message->to($email)->subject($subject);
});
\Log::info("Email Sent ");
} catch(\Exception $e) {
\Log::info("Email Error ".print_r($e , true));
return Helper::error_message(109);
}
}
在我的邮件功能停止工作并给出此异常错误消息之后,我试图通过 composer update 命令更新作曲家:
[2018-03-09 11:21:22] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException'
with message 'Allowed memory size of 268435456 bytes exhausted
(tried to allocate 252182528 bytes)' in /home/ubuntu/thumbtack-base/app/Helpers/Helper.php:708
Stack trace:
#0 {main}
我的代码有什么问题?