我想使用laravel api将subusers类添加到我的网站中,使用Auth :: user到另一个表而不删除主auth方法

public function loginsub(Request $request){ 
        if(Auth::attempt(['email' => request('email'),'password' => request('password')])){ 
            $user = Auth::user(); 
}

 public function login(Request $request){ 
        if(Auth::attempt(['email' => request('email'),'password' => request('password')])){ 
            $user = Auth::user(); 
}

the Auth::user(); method checks through the users table and works fine, I want to use subuser table only when I use loginsub function and keep it to the default user table when I use login() function