我正在尝试使用手动身份验证来验证客户实例。无法存储身份验证会话。当我刷新或转到另一页时,身份验证不确定。
$user=Customer::find(1);
Auth::login($user);
请确保您的customer
类继承了Authenticatable
接口。例如,您的课程应类似于:
use Illuminate\Foundation\Auth\Customer as Authenticatable;
class Customer extends Authenticatable
{
// YOur model code here
}