Это работа очень хорошо, прежде чем несколько дней назад. < /p>
Когда я пытаюсь войти в свою сеть, она снова и снова выбираю пользователь, я буду удалять свое обновление.
Код: Выделить всё
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.14}
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.15}
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.16}
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.16}
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.16}
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.15}
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.15}
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.14}
[2025-06-06 04:19:23] local.INFO: SQL Query {"sql":"select * from `users` where `id` = ? limit 1","bindings":[1],"time":0.15}
< /code>
Самое странное, что эта программа работает на другом компьютере. < /p>
Я обнаружил, что удаление этой строки в SessionGuard.php решит проблему, но $ request-> user () будет нулевым. < /p>
protected function updateSession($id)
{
$this->session->put($this->getName(), $id); // delete this line
$this->session->migrate(true);
}
< /code>
Моя функция входа в аутентификацию sessionController < /p>
public function store(Request $request): RedirectResponse
{
$request->validate([
'email' => 'required|email',
'password' => 'required',
]);
$request->authenticateAccount(); // crash function
$request->user()->createToken('api');
return redirect('/homeManage');
}
< /code>
Функция сбоя < /p>
public function authenticate(): bool
{
$result = $this->ensureIsNotRateLimited();
if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) { // crash in this condition process
RateLimiter::hit($this->throttleKey());
throw ValidationException::withMessages([
'email' => __('auth.failed'),
]);
}
RateLimiter::clear($this->throttleKey());
return $result;
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... when-login