Fills the gaps between the admin panel screens and the backend: a full free-text + slide-count + language -> AI-generated presentation flow with new slide-cloning logic in TemplateFillService, a "my presentations" list endpoint, a swappable payment-gateway structure for wallet top-ups (fake driver for now), and avatar upload / public-profile toggle / account deletion / password change / notification preference endpoints. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Profile;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ChangePasswordRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'current_password' => ['required', 'string', 'current_password'],
|
|
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'current_password.required' => 'رمز عبور فعلی الزامی است.',
|
|
'current_password.current_password' => 'رمز عبور فعلی صحیح نیست.',
|
|
'password.required' => 'رمز عبور جدید الزامی است.',
|
|
'password.min' => 'رمز عبور جدید باید حداقل ۸ کاراکتر باشد.',
|
|
'password.confirmed' => 'تکرار رمز عبور جدید مطابقت ندارد.',
|
|
];
|
|
}
|
|
}
|