【发布时间】:2019-10-23 21:29:39
【问题描述】:
我是编码新手,我正在尝试扩展 \TCG\Voyager\Models\User 和 Authenticatable 一起实现 MustVerifyEmail,但我不知道该怎么做。
我尝试了User 类扩展\TCG\Voyager\Models\User,Authenticatable 一起实现MustVerifyEmail,但这对我不起作用。
我已经创建了 2 个单独的类,但我也没有。
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements MustVerifyEmail extends \TCG\Voyager\Models\User
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
}
【问题讨论】: