- Created ExampleTest and RoutesTest for basic application response and route testing. - Implemented IsolatedDatabaseTestCase for isolated database testing. - Added unit tests for various models and services including Contract, CPE, and LeadDetail. - Developed request validation tests for CreateClientRequest, UpdateClientRequest, and ContractRequest. - Introduced Vite configuration for asset management in the Laravel application.
35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Auth;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
|
use App\Services\AuthService;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Password;
|
|
|
|
class ForgotPasswordController extends Controller
|
|
{
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Password Reset Controller
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This controller is responsible for handling password reset emails and
|
|
| includes a trait which assists in sending these notifications from
|
|
| your application to your users. Feel free to explore this trait.
|
|
|
|
|
*/
|
|
|
|
use SendsPasswordResetEmails;
|
|
|
|
public function sendResetLinkEmail(Request $request, AuthService $authentication)
|
|
{
|
|
$credentials = $request->validate(['email' => 'required|email']);
|
|
$status = $authentication->sendResetLink($credentials);
|
|
return $status === Password::RESET_LINK_SENT
|
|
? back()->with('status', __($status))
|
|
: back()->withErrors(['email' => __($status)]);
|
|
}
|
|
}
|