这是我的App / user.php文件:
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Authenticatable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class user extends Model implements AuthenticatableContract, CanResetPasswordContract
{
//
use Authenticatable, CanResetPassword;
public function session(){
return $this->hasMany("App\session", "userid", "userid");
}
}
错误返回: user.php第12行中的FatalErrorException: Trait' App \ CanResetPassword'找不到
帮助我!
答案 0 :(得分:0)
您希望将use Illuminate\Auth\Passwords\CanResetPassword;
添加到文件顶部的其他use
语句块中。