Shift to consistent, fluent response chains

This commit is contained in:
Shift
2024-10-31 20:46:52 +00:00
parent ed2b20c34f
commit a3f7091785
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ class Utility
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n".
'<error code="'.$errorCode.'" description="'.$errorText."\"/>\n";
return response($response)->header('Content-type', 'text/xml')->header('Content-Length', strlen($response))->header('X-NNTmux', 'API ERROR ['.$errorCode.'] '.$errorText)->header('HTTP/1.1', $errorHeader);
return response($response)->header('Content-type', 'text/xml')->header('Content-Length', strlen())->header('X-NNTmux', 'API ERROR ['.$errorCode.'] '.$errorText)->header('HTTP/1.1', $errorHeader);
}
public static function getRange($tableName): LengthAwarePaginator
@@ -65,7 +65,7 @@ class LoginController extends Controller
$this->fireLockoutEvent($request);
$request->session()->flash('message', 'You have failed to login too many times.Try again in '.$this->decayMinutes().' minutes.');
return redirect('login');
return redirect()->to('login');
}
if ($validator->passes()) {
@@ -76,7 +76,7 @@ class LoginController extends Controller
if (! $user->isVerified() || $user->isPendingVerification()) {
$request->session()->flash('message', 'You have not verified your email address!');
return redirect('login');
return redirect()->to('login');
}
if (Auth::attempt($request->only($login_type, 'password'), $rememberMe)) {
@@ -96,13 +96,13 @@ class LoginController extends Controller
$request->session()->flash('message', 'Username or email used do not match our records!');
}
return redirect('login');
return redirect()->to('login');
}
$this->incrementLoginAttempts($request);
$request->session()->flash('message', implode('', Arr::collapse($validator->errors()->toArray())));
return redirect('login');
return redirect()->to('login');
}
public function showLoginForm()