Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(app): refactor #62

Merged
merged 7 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers;

use App\Http\Requests\ForgotPasswordRequest;
use App\Http\Requests\PostLoginRequest;
use App\Http\Requests\LoginRequest;
use App\Http\Requests\ResetPasswordRequest;
use App\Models\User;
use Illuminate\Auth\Events\PasswordReset;
Expand All @@ -14,7 +14,7 @@

class AuthController extends Controller
{
public function postLogin(PostLoginRequest $request)
public function login(LoginRequest $request)
{
if (Auth::attempt($request->only('email', 'password'))) {
activity()->causedBy(auth()->user())->log('User logged into the portal'); // Log activity message
Expand Down Expand Up @@ -60,7 +60,7 @@ function (User $user, string $password) {
);

return $status === Password::PASSWORD_RESET
? redirect()->route('login')->with('status', __($status))
? redirect()->route('login.index')->with('status', __($status))
: back()->withErrors(['email' => [__($status)]]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Foundation\Http\FormRequest;

class PostLoginRequest extends FormRequest
class LoginRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
Expand Down
Loading
Loading