我的代码是这样的:
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Test')
->greeting('Hello '.$notifiable->store->name.'!')
->line('Test 1')
->line('Test 2')
->action('Check Order',url('member/store/sale'))
->line('Thanks');
}
点击操作后,会调用http://localhost/member/store/sale
这是错误的
应该致电http://myshop.dev/member/store/sale
我该如何解决?
答案 0 :(得分:3)
调用url()
应该可以完美运行。但您是否更新了.env文件以设置应用程序URL?
编辑你的.env
APP_URL=http://myshop.dev/
然后清除缓存
php artisan config:cache