Initial commit of the L'Ami Fiduciaire SaaS platform built on Laravel 12, Vue 3, Inertia.js 2, and Tailwind CSS 4. Story 0.1 (rename folders to declarations in database) is implemented and code-reviewed: migration, rollback, and 6 Pest tests all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
686 B
PHP
30 lines
686 B
PHP
<?php
|
|
|
|
namespace App\Actions\Fortify;
|
|
|
|
use App\Concerns\PasswordValidationRules;
|
|
use App\Models\User;
|
|
use Illuminate\Support\Facades\Validator;
|
|
use Laravel\Fortify\Contracts\ResetsUserPasswords;
|
|
|
|
class ResetUserPassword implements ResetsUserPasswords
|
|
{
|
|
use PasswordValidationRules;
|
|
|
|
/**
|
|
* Validate and reset the user's forgotten password.
|
|
*
|
|
* @param array<string, string> $input
|
|
*/
|
|
public function reset(User $user, array $input): void
|
|
{
|
|
Validator::make($input, [
|
|
'password' => $this->passwordRules(),
|
|
])->validate();
|
|
|
|
$user->forceFill([
|
|
'password' => $input['password'],
|
|
])->save();
|
|
}
|
|
}
|