1
It would be interesting put the code of the method of its controller, because depending on the conditions used it can pass the method without performing any operation, until it arrives in Return, so it is giving 200.
Ex:
{
$dados = (object) $request->all();
$usuario = usuairo::where('email',$dados->email)->first();
if($usuario){
if($this->testeUsuarioSenha($dados))
return Response::json(['message' => 'Login realizado com sucesso'], 200);
else
return Response::json(['message' => 'Não encontrado'], 404);
}
return '';
}
Looking at the above code, do you agree that for emails that do not exist in the database will return http 200? Finally to help would need more information.
On the server run the following command and analyze your routes:
php artisan route:list
Another interesting point to observe, is in production run also.
php artisan route:cache