Я установил логин администратора, но при отправке формы выдается ошибка.Я пытался глобально искать restaurant_users
, но я ничего не могу найти.
контроллер входа:
public function login(Request $request) {
$this->validate($request, [
'email' => 'required|email',
'password' => 'required|min:6'
]);
if (Auth::guard('restaurantuser')->attempt(['email' => $request->email, 'password' => $request->password])) {
return redirect()->intended(route('dish.create'));
}
return redirect()->back()->withInput($request->only('email'));
}
схема:
Schema::create('restaurantuser', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
ошибка:
SQLSTATE [HY000]: общая ошибка: 1 неттакая таблица: restaurant_users (SQL: выберите * из «restaurant_users», где «email» = admin@test.com limit 1)
Если нужен какой-либо другой код, дайте мне знать, и я предоставлю его.