aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-11-16 19:05:22 +0100
committerMateja <mail@matejamaric.com>2020-11-16 19:05:22 +0100
commit03616b700748fe4e44eea484a4d7679121517791 (patch)
tree1fca0dc2ed234717edae34fc4bfc16e56d8e44fc /app
parentaed493eb95bf660145003f024434296c91d1c8c3 (diff)
downloadyota-laravel-03616b700748fe4e44eea484a4d7679121517791.tar.gz
yota-laravel-03616b700748fe4e44eea484a4d7679121517791.zip
Reservations sorting fix.
Diffstat (limited to 'app')
-rw-r--r--app/Http/Controllers/ReservationsController.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Http/Controllers/ReservationsController.php b/app/Http/Controllers/ReservationsController.php
index 249d18a..b347409 100644
--- a/app/Http/Controllers/ReservationsController.php
+++ b/app/Http/Controllers/ReservationsController.php
@@ -32,6 +32,7 @@ class ReservationsController extends Controller
if ($request->input('call-sign') == 'all') {
$activities = Reservation::where('approved', '1')
->select('operatorCall', 'fromTime', 'toTime', 'specialCall', 'frequencies', 'qso')
+ ->orderBy('fromTime', 'asc')
->get()->toArray();
$data = [
'status' => 'OK',
@@ -43,6 +44,7 @@ class ReservationsController extends Controller
$activities = Reservation::where('approved', '1')
->select('operatorCall', 'fromTime', 'toTime', 'specialCall', 'frequencies', 'qso')
->where('specialCall', $request->input('call-sign'))
+ ->orderBy('fromTime', 'asc')
->get()
->toArray();
$data = [
@@ -126,7 +128,7 @@ class ReservationsController extends Controller
// Administration
public function edit(Request $request)
{
- $data = Reservation::all();
+ $data = Reservation::orderBy('id', 'desc')->get();
return view('pages.reservations', compact('data'));
}