PHP 8.2.30
Preview: PasswordResetLinkController.php Size: 1.39 KB
/home/byroehnu/cnggold.com.ng/app/Http/Controllers/Auth/PasswordResetLinkController.php

<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Password;
use Illuminate\Validation\ValidationException;
use Inertia\Inertia;
use Inertia\Response;

class PasswordResetLinkController extends Controller
{
    /**
     * Display the password reset link request view.
     */
    public function create(): Response
    {
        return Inertia::render('Auth/ForgotPassword', [
            'status' => session('status'),
        ]);
    }

    /**
     * Handle an incoming password reset link request.
     *
     * @throws \Illuminate\Validation\ValidationException
     */
    public function store(Request $request): RedirectResponse
    {
        $request->validate([
            'email' => 'required|email',
        ]);

        // We will send the password reset link to this user. Once we have attempted
        // to send the link, we will examine the response then see the message we
        // need to show to the user. Finally, we'll send out a proper response.
        $status = Password::sendResetLink(
            $request->only('email'),
        );

        if ($status == Password::RESET_LINK_SENT) {
            return back()->with('status', __($status));
        }

        throw ValidationException::withMessages([
            'email' => [trans($status)],
        ]);
    }
}

Directory Contents

Dirs: 0 × Files: 11

Name Size Perms Modified Actions
2.31 KB lrw-r--r-- 2025-04-19 04:22:18
Edit Download
1.06 KB lrw-r--r-- 2025-04-08 04:12:56
Edit Download
661 B lrw-r--r-- 2025-04-08 04:12:56
Edit Download
659 B lrw-r--r-- 2025-04-08 04:12:56
Edit Download
2.80 KB lrw-r--r-- 2025-04-19 04:22:18
Edit Download
2.27 KB lrw-r--r-- 2025-04-08 04:12:56
Edit Download
734 B lrw-r--r-- 2025-04-08 04:12:56
Edit Download
1.39 KB lrw-r--r-- 2025-04-08 04:12:56
Edit Download
2.35 KB lrw-r--r-- 2025-05-08 11:48:26
Edit Download
1.26 KB lrw-r--r-- 2025-05-05 10:46:17
Edit Download
822 B lrw-r--r-- 2025-04-08 04:12:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).