Laravel 4.2电子邮件::资产队列

时间:2014-09-25 15:04:05

标签: laravel supervisord beanstalkd mail-queue

很简单,我正在尝试使用服务beanstalkd和supervisord排队电子邮件,如下所示:

Mail::queue('emails.congratulations', $user, function($message) use($user) {
    $message->to($user['email'], $user['name'])
        ->subject('Congratulations!');
});

我的主管程序配置:

[program:emailservice]
command=php /path/to/laravel/artisan queue:listen
stdout_logfile=/path/to/laravel/app/storage/logs/emailservice_supervisord.log
redirect_stderr=true

在我的刀片文件中,我正在尝试访问资源,图像:

<p>
    <img src="{{ asset('assets/img/logo.png') }}" />
</p>

发送和接收电子邮件时,图像被破坏,图像的URL如下所示:

<img src="http://:/assets/img/logo.png"/>

我无法弄清楚域名为:

的原因

如果有其他人经历过这种行为,那么最好将其公之于众,因为我已经搜索了Google和StackOverflow以获取此问题的答案,而没有提及此问题。

我问自己的一个问题......排队时,Laravel / Supervisor / Beanstalk是否足够智能,能够记住该职位的域名?

1 个答案:

答案 0 :(得分:0)

您必须在config / app.php中将应用程序网址设置为您的域(默认情况下为http://localhost)。