这是我用于管理员登录的控制器:
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
class AdminLoginController extends Controller
{
public function __construct(){
$this->middleware('guest:admin');
}
public function showLoginForm(){
return view('auth.admin-login');
}
public function login(Request $request){
//validate the form data
$this->validate($request, [
'email' => 'required|email',
'password'=> 'required|min6'
]);
//attemo to log the user in
if (Auth::guard('admin')->attempt(['email'=> $request->email, 'password'=>$request->password], $request->rmember)){
//if successful, then redirect back to their intended location
return redirect()->intended(route('admin.dashboard'));
}
//if unsuccessful, then redirect back to login with the form data
return redirect()->back()->withInput($request->only('email','remember'));
}
}
但我收到此错误: 类App \ Http \ Controllers \ AdminLoginController不存在