Skip to content

Commit 04a0201

Browse files
authored
Formatting (#7)
* wording updates * formatting * formatting * formatting * formatting * consistency * remove util * formatting
1 parent ec9c13e commit 04a0201

20 files changed

+47
-45
lines changed

app/Http/Controllers/Auth/AuthenticatedSessionController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
class AuthenticatedSessionController extends Controller
1515
{
1616
/**
17-
* Display the login view.
17+
* Show the login page.
1818
*/
1919
public function create(): Response
2020
{
@@ -44,7 +44,6 @@ public function destroy(Request $request): RedirectResponse
4444
Auth::guard('web')->logout();
4545

4646
$request->session()->invalidate();
47-
4847
$request->session()->regenerateToken();
4948

5049
return redirect('/');

app/Http/Controllers/Auth/ConfirmablePasswordController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class ConfirmablePasswordController extends Controller
1414
{
1515
/**
16-
* Show the confirm password view.
16+
* Show the confirm password page.
1717
*/
1818
public function show(): Response
1919
{

app/Http/Controllers/Auth/EmailVerificationPromptController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
class EmailVerificationPromptController extends Controller
1212
{
1313
/**
14-
* Display the email verification prompt.
14+
* Show the email verification prompt.
1515
*/
16-
public function __invoke(Request $request): RedirectResponse|Response
16+
public function __invoke(Request $request): Response|RedirectResponse
1717
{
1818
return $request->user()->hasVerifiedEmail()
1919
? redirect()->intended(route('dashboard', absolute: false))

app/Http/Controllers/Auth/NewPasswordController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class NewPasswordController extends Controller
1818
{
1919
/**
20-
* Display the password reset view.
20+
* Show the password reset page.
2121
*/
2222
public function create(Request $request): Response
2323
{
@@ -59,11 +59,11 @@ function ($user) use ($request) {
5959
// the application's home authenticated view. If there is an error we can
6060
// redirect them back to where they came from with their error message.
6161
if ($status == Password::PasswordReset) {
62-
return redirect()->route('login')->with('status', __($status));
62+
return to_route('login')->with('status', __($status));
6363
}
6464

6565
throw ValidationException::withMessages([
66-
'email' => [trans($status)],
66+
'email' => [__($status)],
6767
]);
6868
}
6969
}

app/Http/Controllers/Auth/PasswordResetLinkController.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
class PasswordResetLinkController extends Controller
1313
{
1414
/**
15-
* Display the password reset link request view.
15+
* Show the password reset link request page.
1616
*/
17-
public function create(): Response
17+
public function create(Request $request): Response
1818
{
1919
return Inertia::render('auth/forgot-password', [
20-
'status' => session('status'),
20+
'status' => $request->session()->get('status'),
2121
]);
2222
}
2323

@@ -32,13 +32,10 @@ public function store(Request $request): RedirectResponse
3232
'email' => 'required|email',
3333
]);
3434

35-
// We will send the password reset link to this user if the email exists
3635
Password::sendResetLink(
3736
$request->only('email')
3837
);
3938

40-
// We want to always return a 200 response, even if the user is not found. This is a
41-
// security measure to prevent email accounts from being discovered
42-
return back()->with('status', __('If that email exists in our system, a reset link was sent.'));
39+
return back()->with('status', __('If an account exists with that email, you’ll receive a reset link shortly.'));
4340
}
4441
}

app/Http/Controllers/Auth/RegisteredUserController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class RegisteredUserController extends Controller
1717
{
1818
/**
19-
* Display the registration view.
19+
* Show the registration page.
2020
*/
2121
public function create(): Response
2222
{
@@ -46,6 +46,6 @@ public function store(Request $request): RedirectResponse
4646

4747
Auth::login($user);
4848

49-
return redirect(route('dashboard', absolute: false));
49+
return to_route('dashboard');
5050
}
5151
}

app/Http/Controllers/Settings/PasswordController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
class PasswordController extends Controller
1515
{
1616
/**
17-
* Display the user's password form.
17+
* Display the user's password settings form.
1818
*/
1919
public function edit(Request $request): Response
2020
{
2121
return Inertia::render('settings/password', [
2222
'mustVerifyEmail' => $request->user() instanceof MustVerifyEmail,
23-
'status' => session('status'),
23+
'status' => $request->session()->get('status'),
2424
]);
2525
}
2626

app/Http/Controllers/Settings/ProfileController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
class ProfileController extends Controller
1616
{
1717
/**
18-
* Display the user's profile form.
18+
* Display the user's profile settings form.
1919
*/
2020
public function edit(Request $request): Response
2121
{
2222
return Inertia::render('settings/profile', [
2323
'mustVerifyEmail' => $request->user() instanceof MustVerifyEmail,
24-
'status' => session('status'),
24+
'status' => $request->session()->get('status'),
2525
]);
2626
}
2727

2828
/**
29-
* Update the user's profile information.
29+
* Update the user's profile settings.
3030
*/
3131
public function update(ProfileUpdateRequest $request): RedirectResponse
3232
{
@@ -38,11 +38,11 @@ public function update(ProfileUpdateRequest $request): RedirectResponse
3838

3939
$request->user()->save();
4040

41-
return Redirect::route('profile.edit');
41+
return to_route('profile.edit');
4242
}
4343

4444
/**
45-
* Delete the user's profile.
45+
* Delete the user's account.
4646
*/
4747
public function destroy(Request $request): RedirectResponse
4848
{
@@ -59,6 +59,6 @@ public function destroy(Request $request): RedirectResponse
5959
$request->session()->invalidate();
6060
$request->session()->regenerateToken();
6161

62-
return Redirect::to('/');
62+
return redirect('/');
6363
}
6464
}

app/Http/Middleware/HandleInertiaRequests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ public function share(Request $request): array
4040

4141
return array_merge(parent::share($request), [
4242
...parent::share($request),
43+
'name' => config('app.name'),
44+
'quote' => ['message' => trim($message), 'author' => trim($author)],
4345
'auth' => [
4446
'user' => $request->user(),
4547
],
46-
'name' => config('app.name'),
47-
'quote' => ['message' => trim($message), 'author' => trim($author)],
4848
]);
4949
}
5050
}

app/Http/Requests/Auth/LoginRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function authenticate(): void
4545
RateLimiter::hit($this->throttleKey());
4646

4747
throw ValidationException::withMessages([
48-
'email' => trans('auth.failed'),
48+
'email' => __('auth.failed'),
4949
]);
5050
}
5151

@@ -68,7 +68,7 @@ public function ensureIsNotRateLimited(): void
6868
$seconds = RateLimiter::availableIn($this->throttleKey());
6969

7070
throw ValidationException::withMessages([
71-
'email' => trans('auth.throttle', [
71+
'email' => __('auth.throttle', [
7272
'seconds' => $seconds,
7373
'minutes' => ceil($seconds / 60),
7474
]),

0 commit comments

Comments
 (0)