e3da625927
- Backend Laravel 11 (API REST, JWT auth, PostgreSQL) - Frontend Next.js 14 (React, TypeScript, Tailwind CSS) - Docker Compose (PostgreSQL, backend, frontend) - Modules : auth, profil, tracker émotions, informations, admin
28 lines
583 B
PHP
28 lines
583 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class UpdateProfilRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'nom' => 'sometimes|string|max:255',
|
|
'prenom' => 'sometimes|string|max:255',
|
|
'email' => [
|
|
'sometimes',
|
|
'email',
|
|
Rule::unique('utilisateurs', 'email')->ignore(auth()->id()),
|
|
],
|
|
];
|
|
}
|
|
}
|