aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-11-01 12:12:31 +0100
committerMateja <mail@matejamaric.com>2020-11-01 12:12:31 +0100
commit590ecae90b0d03cd03507ca88e29a0ed4c28e5c1 (patch)
treea4f8c6afc933f41f26b82b00af10c3db41999ec6
parent57dff5950b32a5c4c6f8fcddc7ce3b28601792f8 (diff)
downloadyota-laravel-590ecae90b0d03cd03507ca88e29a0ed4c28e5c1.tar.gz
yota-laravel-590ecae90b0d03cd03507ca88e29a0ed4c28e5c1.zip
Display in reservations.
-rw-r--r--app/Http/Controllers/SpecialCallsController.php3
-rw-r--r--resources/views/pages/reservations.blade.php39
2 files changed, 39 insertions, 3 deletions
diff --git a/app/Http/Controllers/SpecialCallsController.php b/app/Http/Controllers/SpecialCallsController.php
index 8238d94..6f173b9 100644
--- a/app/Http/Controllers/SpecialCallsController.php
+++ b/app/Http/Controllers/SpecialCallsController.php
@@ -107,7 +107,8 @@ class SpecialCallsController extends Controller
public function reservations(Request $request)
{
- return view('pages.reservations');
+ $data = Reservation::all();
+ return view('pages.reservations', compact('data'));
}
public function reservationsForm(Request $request)
diff --git a/resources/views/pages/reservations.blade.php b/resources/views/pages/reservations.blade.php
index 56c379d..9a27ee7 100644
--- a/resources/views/pages/reservations.blade.php
+++ b/resources/views/pages/reservations.blade.php
@@ -6,9 +6,44 @@
@section('content')
<div class="table-responsive">
- <table class="table table-striped table-bordered"><!-- table-hover -->
+ <table class="table table-striped table-bordered" style="white-space:nowrap;"><!-- table-hover -->
<thead class="thead-dark">
- <tr><th>ID</th><th>Approved</th><th>Operator Callsign</th><th>QSO</th><th>From</th><th>To</th><th>Frequencies</th><th>Modes</th><th>Special Callsign</th><th>Operator Name</th><th>Operator Email</th><th>Operator Phone</th><th>Actions</th></tr>
+ <tr>
+ <th>ID</th>
+ <th>Approved</th>
+ <th>Operator Callsign</th>
+ <th>QSO</th>
+ <th>From</th>
+ <th>To</th>
+ <th>Frequencies</th>
+ <th>Modes</th>
+ <th>Special Callsign</th>
+ <th>Operator Name</th>
+ <th>Operator Email</th>
+ <th>Operator Phone</th>
+ <th>Actions</th>
+ </tr>
+ @foreach ($data as $row)
+ <tr>
+ <td>{{ $row->id }}</td>
+ <td>{{ $row->approved }}</td>
+ <td>{{ $row->operatorCall }}</td>
+ <td>{{ $row->qso }}</td>
+ <td>{{ $row->fromTime }}</td>
+ <td>{{ $row->toTime }}</td>
+ <td>{{ $row->frequencies }}</td>
+ <td>{{ $row->modes }}</td>
+ <td>{{ $row->specialCall }}</td>
+ <td>{{ $row->operatorName }}</td>
+ <td>{{ $row->operatorEmail }}</td>
+ <td>{{ $row->operatorPhone }}</td>
+ <td>
+ <button class="btn btn-primary">Update</button>
+ <button class="btn btn-warning">Restore</button>
+ <button class="btn btn-danger">Delete</button>
+ </td>
+ </tr>
+ @endforeach
</thead>
<tbody>
</tbody>