added support for resetting a password while logged in
This commit is contained in:
parent
e81cfcb19a
commit
24e9d28a6e
4 changed files with 53 additions and 2 deletions
31
app/Http/Requests/PasswordResetWithTokenRequest.php
Normal file
31
app/Http/Requests/PasswordResetWithTokenRequest.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class PasswordResetWithTokenRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'password' => 'required|string|min:8|confirmed',
|
||||
'password_confirmation' => 'string',
|
||||
'token' => 'required|string',
|
||||
'email' => 'required|email|exists:users,email',
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue