Loading app/Http/Controllers/DivesList.php +3 −3 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ function index(): View ->get(); $user = session()->get('user'); $locations = DivingLocation::all(); $levels = Prerogative::all(); $levels = Prerogative::select('PRE_MAX_DEPTH')->groupby('PRE_MAX_DEPTH')->get(); return view('dives', ['dives' => $dives, 'userPre' => Prerogative::find($user->PRE_CODE), 'locations' => $locations, 'levels' => $levels]); } Loading Loading @@ -68,7 +68,7 @@ function filter(Request $request) { $dives = $dives->where('CAR_SCHEDULE', $creneau); } if ($level != null && $level != 'default') { $dives = $dives->where('DS_MAX_DEPTH', '<=', $level); $dives = $dives->where('DS_MAX_DEPTH', '<=', intval($level)); } if ($date != null && $date != 'default') { $dives = $dives->where('DS_DATE', '>=', $date); Loading @@ -76,7 +76,7 @@ function filter(Request $request) { $dives = $dives->orderBy('DS_DATE', 'asc')->get(); $user = session()->get('user'); $locations = DivingLocation::all(); $levels = Prerogative::all(); $levels = Prerogative::select('PRE_MAX_DEPTH')->groupby('PRE_MAX_DEPTH')->get(); return view('dives', ['dives' => $dives, 'userPre' => Prerogative::find($user->PRE_CODE), 'locations' => $locations, 'levels' => $levels]); } } resources/views/dives.blade.php +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ strftime('%d/%m/%Y', strtotime($dive->DS_DATE)) }}</td> <td class="px-6 py-4">{{ $dive->CAR_SCHEDULE }}</td> <td class="px-6 py-4">{{ $dive->DL_DEPTH }}m</td> <td class="px-6 py-4">@if ($dive->DS_MAX_DEPTH != null) {{$dive->DS_MAX_DEPTH}}m @else Profondeur inconnue @endif</td> <td class="px-6 py-4">{{ $dive->DL_NAME }}</td> <td class="px-8 py-4"> <a href='/dives/{{$dive->DS_CODE}}'> Loading Loading
app/Http/Controllers/DivesList.php +3 −3 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ function index(): View ->get(); $user = session()->get('user'); $locations = DivingLocation::all(); $levels = Prerogative::all(); $levels = Prerogative::select('PRE_MAX_DEPTH')->groupby('PRE_MAX_DEPTH')->get(); return view('dives', ['dives' => $dives, 'userPre' => Prerogative::find($user->PRE_CODE), 'locations' => $locations, 'levels' => $levels]); } Loading Loading @@ -68,7 +68,7 @@ function filter(Request $request) { $dives = $dives->where('CAR_SCHEDULE', $creneau); } if ($level != null && $level != 'default') { $dives = $dives->where('DS_MAX_DEPTH', '<=', $level); $dives = $dives->where('DS_MAX_DEPTH', '<=', intval($level)); } if ($date != null && $date != 'default') { $dives = $dives->where('DS_DATE', '>=', $date); Loading @@ -76,7 +76,7 @@ function filter(Request $request) { $dives = $dives->orderBy('DS_DATE', 'asc')->get(); $user = session()->get('user'); $locations = DivingLocation::all(); $levels = Prerogative::all(); $levels = Prerogative::select('PRE_MAX_DEPTH')->groupby('PRE_MAX_DEPTH')->get(); return view('dives', ['dives' => $dives, 'userPre' => Prerogative::find($user->PRE_CODE), 'locations' => $locations, 'levels' => $levels]); } }
resources/views/dives.blade.php +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ strftime('%d/%m/%Y', strtotime($dive->DS_DATE)) }}</td> <td class="px-6 py-4">{{ $dive->CAR_SCHEDULE }}</td> <td class="px-6 py-4">{{ $dive->DL_DEPTH }}m</td> <td class="px-6 py-4">@if ($dive->DS_MAX_DEPTH != null) {{$dive->DS_MAX_DEPTH}}m @else Profondeur inconnue @endif</td> <td class="px-6 py-4">{{ $dive->DL_NAME }}</td> <td class="px-8 py-4"> <a href='/dives/{{$dive->DS_CODE}}'> Loading