diff --git a/app/Http/Controllers/Api/OddController.php b/app/Http/Controllers/Api/OddController.php index 5b8ca6f..c3716d2 100644 --- a/app/Http/Controllers/Api/OddController.php +++ b/app/Http/Controllers/Api/OddController.php @@ -87,7 +87,7 @@ public function store(Request $request) public function show($id) { $odd = Odd::find($id); - $odd->categorieOdd; + $odd->categorieOdd = $odd->categorieOdd()->orderBy('id', 'asc')->get(); $count = $this->countOscByOdd($id); $odd->count_osc = $count; return $this->sendResponse($odd, 'Odd trouvé');