----------------------------------------------------------------- php artisan db:seed php artisan db:seed --class=UserSeeder php artisan db:seed --class=VillesTableSeeder php artisan db:seed --class=CommunesTableSeeder php artisan db:seed --class=MatieresTableSeeder php artisan db:seed --class=NiveauScolaireTableSeeder php artisan db:seed --class=OffreCoursTableSeeder _ mot de passe oublié _ gerer : en négociation _ ajouter plusieur matière dans le champ matière : ok sudo rm index.html sudo git clone -b dev https://gitlab.com/TheDx0/monprof-ci-v0.git /var/www/html/ sudo nano /var/www/html/.env ... docker compose up -d ----------------------------------------------------------- sudo composer install --no-dev --optimize-autoloader sudo php artisan key:generate sudo chown -R www-data:www-data /var/www/html sudo find /var/www/html -type f -exec chmod 644 {} \; sudo find /var/www/html -type d -exec chmod 755 {} \; cd /var/www/html sudo chown -R $USER:www-data . sudo find . -type f -exec chmod 664 {} \; sudo find . -type d -exec chmod 775 {} \; cd /etc/apache2/sites-available/ cd /etc/apache2/sites-available/ sudo a2enmod rewrite sudo systemctl restart apache2 ________ _ offre en attente, terminé, ... _ offre prof en attente, terminé, ... _ offre eleve en attente, terminé, ... _ filtre par ville, matière, ... Route::get('offres-filter-experience', [OffreCoursController::class, 'filterByExperience']); ___________________________ public function update(Request $request, $id) { try { $offre = OffreCours::findOrFail($id); if ($offre->id_auteur !== Auth::id()) { return response()->json(['message' => 'Vous n\'êtes pas autorisé à modifier cette offre.'], 403); } $validated = $request->validate([ 'titre' => 'sometimes|string|max:255', 'description' => 'sometimes|string', 'type_offre' => 'sometimes|in:Élève->Cherche Professeur,Professeur->Propose Cours', ]); $offre->update($validated); return response()->json(['message' => 'Offre mise à jour.', 'offre' => $offre->load('auteur')]); } catch (\Exception $e) { return response()->json(['message' => 'Erreur lors de la mise à jour : ' . $e->getMessage()], 500); } } je souhaite que seul l'utilisateur qui a le role "admin" puisse mofilier champ "type_offre" (sometimes|in:Élève->Cherche Professeur,Professeur->Propose Cours', )dans cette fonction