feat: initialisation complète du projet CESIZen
- 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
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Emotion;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class EmotionController extends Controller
|
||||
{
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
$emotions = Emotion::actives()
|
||||
->niveau(1)
|
||||
->with(['enfants' => function ($query) {
|
||||
$query->actives()->orderBy('nom');
|
||||
}])
|
||||
->orderBy('nom')
|
||||
->get();
|
||||
|
||||
return response()->json($emotions);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user