hi @norbertho
you just need to pass it as the second param of ->json()
eg:
return response()->json([
'errors' => "Password does't match",
], 422);
Or instead of the 422 you could do this, so you (in future) dont have to remember what 422 is (useful for other areas too)
return response()->json([
'errors' => "Password does't match",
], Response::HTTP_UNPROCESSABLE_ENTITY);