Loading resources/views/create_dive.blade.php +20 −0 Original line number Diff line number Diff line Loading @@ -4,7 +4,27 @@ <div style="display : flex; flex-direction: row"> <div style="width: 50%; margin-right: 50px; height: 100%; display:flex; align-items: center; flex-direction: column"> @if(isset($precedent)) <img src="{{ asset('/images/Diver1.png') }}" alt="Diver illustration"> @else <p>Plongées crées</p> <table> <tr> <th>Date et heure</th> <th>Nombre maximum d'inscrits</th> <th>Site</th> <th>Niveau requis</th> </tr> @foreach ($precedent as $dive) <tr> <td>{{ $dive->DS_DATE }}</td> <td>{{ $dive->DS_MAX_DIVERS }}</td> <td>{{ $dive->DL_NAME }}</td> <td>{{ $dive->PRE_CODE }}</td> </tr> @endforeach </table> @endif </div> <form action="/create/dive" method="POST" style="width: 70%;font-size: 20px;"> @csrf Loading routes/web.php +6 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,12 @@ ->post('/create/dive', function(Request $request) { $pre = DiveSessionCreation::add($request); $previousDives = session('previousDives', []); $previousDives[] = $pre; session(['previousDives' => $previousDives]); return view('create_dive', ['locations' => DivingLocation::all(), 'boats' => Boat::all(), 'levels' => Prerogative::all(), 'users' => User::all(), 'precedent' => $pre]); }); Loading Loading
resources/views/create_dive.blade.php +20 −0 Original line number Diff line number Diff line Loading @@ -4,7 +4,27 @@ <div style="display : flex; flex-direction: row"> <div style="width: 50%; margin-right: 50px; height: 100%; display:flex; align-items: center; flex-direction: column"> @if(isset($precedent)) <img src="{{ asset('/images/Diver1.png') }}" alt="Diver illustration"> @else <p>Plongées crées</p> <table> <tr> <th>Date et heure</th> <th>Nombre maximum d'inscrits</th> <th>Site</th> <th>Niveau requis</th> </tr> @foreach ($precedent as $dive) <tr> <td>{{ $dive->DS_DATE }}</td> <td>{{ $dive->DS_MAX_DIVERS }}</td> <td>{{ $dive->DL_NAME }}</td> <td>{{ $dive->PRE_CODE }}</td> </tr> @endforeach </table> @endif </div> <form action="/create/dive" method="POST" style="width: 70%;font-size: 20px;"> @csrf Loading
routes/web.php +6 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,12 @@ ->post('/create/dive', function(Request $request) { $pre = DiveSessionCreation::add($request); $previousDives = session('previousDives', []); $previousDives[] = $pre; session(['previousDives' => $previousDives]); return view('create_dive', ['locations' => DivingLocation::all(), 'boats' => Boat::all(), 'levels' => Prerogative::all(), 'users' => User::all(), 'precedent' => $pre]); }); Loading