我已經寫在我的註冊功能的郵件代碼的性質,我收到此錯誤Laravel 5試圖讓非對象電子郵件
ErrorException在7c8c0426cb92aba181a5916d6b3e33a6線2: 試圖獲得的非財產對象(查看:/Users/aliayaz/Adcells-master/resources/views/emails/register-activate.blade.php)
Mail::queueOn('Email-Activation', 'emails.register-activate', $data, function ($m) use ($user) {
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
$m->subject('Welcome ' . $user->first_name);
});
和我有註冊激活下資源/視圖/電子郵件
文件@extends('emails/layouts/default')
@section('content')
<p>Hello {{{ $user->first_name }}},</p>
<p>Welcome to SiteNameHere! Please click on the following link to confirm your SiteNameHere account:</p>
<p><a href="{{{ $activationUrl }}}">{{{ $activationUrl }}}</a></p>
<p>Best regards,</p>
<p>@lang('general.site_name') Team</p>
@stop
此代碼下laravel 4.2完美的工作,我想升級到5.0
編輯1: 我沒有文件名爲 7c8c0426cb92aba181a5916d6b3e33a6
我檢查數組包含正確的數據..而且是把數據導入數據庫正常..但不郵寄 –