Change laravel authenticate response to json format Add below code to Authenticate.php abort(response()->json(['message' => 'Unauthorized'], 401));