Loading app/Http/Controllers/DivingNumberController.php +7 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,12 @@ class DivingNumberController extends Controller { public function index(): View { $dateDives = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id') ->join('car_diving_session','car_registration.ds_code','=','car_diving_session.ds_code') ->where('car_user.US_ID',3) ->get(); $user = Auth::user(); if ($user) { $userId = $user->US_ID; Loading @@ -28,7 +34,7 @@ public function index(): View ->count(); $usersCount = 99 - $usersCount; return view('diveractivities', compact('usersCount')); return view('diveractivities', compact('usersCount'), ['dates' => $dateDives]); } public function allIndex(): View Loading resources/views/diveractivities.blade.php +21 −0 Original line number Diff line number Diff line Loading @@ -14,4 +14,25 @@ </tbody> </table> </div> <div class="mt-10 shadow-md max-w-full w-1/3 rounded-lg overflow-hidden border-2 mx-auto"> <table class="text-sm text-left text-gray-500 w-full"> <thead class="text-xs text-gray-700 uppercase bg-gray-50"> <tr> <th scope="col" class="px-6 py-3">Nom</th> <th scope="col" class="px-6 py-3">Prénom</th> <th scope="col" class="px-6 py-3">Date</th> </tr> </thead> <tbody> @foreach($dates as $date) <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ $date->US_NAME }}</td> <td class="px-6 py-4">{{ $date->US_FIRST_NAME }}</td> <td class="px-6 py-4">{{ $date->DS_DATE }}</td> </tr> @endforeach </tbody> </table> </div> </x-layout> Loading
app/Http/Controllers/DivingNumberController.php +7 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,12 @@ class DivingNumberController extends Controller { public function index(): View { $dateDives = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id') ->join('car_diving_session','car_registration.ds_code','=','car_diving_session.ds_code') ->where('car_user.US_ID',3) ->get(); $user = Auth::user(); if ($user) { $userId = $user->US_ID; Loading @@ -28,7 +34,7 @@ public function index(): View ->count(); $usersCount = 99 - $usersCount; return view('diveractivities', compact('usersCount')); return view('diveractivities', compact('usersCount'), ['dates' => $dateDives]); } public function allIndex(): View Loading
resources/views/diveractivities.blade.php +21 −0 Original line number Diff line number Diff line Loading @@ -14,4 +14,25 @@ </tbody> </table> </div> <div class="mt-10 shadow-md max-w-full w-1/3 rounded-lg overflow-hidden border-2 mx-auto"> <table class="text-sm text-left text-gray-500 w-full"> <thead class="text-xs text-gray-700 uppercase bg-gray-50"> <tr> <th scope="col" class="px-6 py-3">Nom</th> <th scope="col" class="px-6 py-3">Prénom</th> <th scope="col" class="px-6 py-3">Date</th> </tr> </thead> <tbody> @foreach($dates as $date) <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ $date->US_NAME }}</td> <td class="px-6 py-4">{{ $date->US_FIRST_NAME }}</td> <td class="px-6 py-4">{{ $date->DS_DATE }}</td> </tr> @endforeach </tbody> </table> </div> </x-layout>