diff options
author | Mateja <mail@matejamaric.com> | 2020-12-06 23:54:38 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2020-12-06 23:54:38 +0100 |
commit | bee1e3a09a7c3de5e9ad0e1dbf593aa643acfc85 (patch) | |
tree | 357326073ac5a9b8bb86526037753eb78c49a4b6 /app/Http/Controllers/ReservationsController.php | |
parent | 36945006257bc3ad65bd564ea6c40b40c0d0002a (diff) | |
download | yota-laravel-bee1e3a09a7c3de5e9ad0e1dbf593aa643acfc85.tar.gz yota-laravel-bee1e3a09a7c3de5e9ad0e1dbf593aa643acfc85.zip |
Small improvements.v1.0.3
Diffstat (limited to 'app/Http/Controllers/ReservationsController.php')
-rw-r--r-- | app/Http/Controllers/ReservationsController.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Http/Controllers/ReservationsController.php b/app/Http/Controllers/ReservationsController.php index 002645a..8f15105 100644 --- a/app/Http/Controllers/ReservationsController.php +++ b/app/Http/Controllers/ReservationsController.php @@ -170,7 +170,8 @@ class ReservationsController extends Controller ]); if ($request->input('call-sign') == 'all') { - $activities = Reservation::orderBy('id', 'desc') + $activities = Reservation::orderBy('fromTime', 'asc') + ->orderBy('toTime', 'asc') ->get() ->toArray(); $data = [ @@ -181,7 +182,8 @@ class ReservationsController extends Controller return response($data); } else { $activities = Reservation::where('specialCall', $request->input('call-sign')) - ->orderBy('id', 'desc') + ->orderBy('fromTime', 'asc') + ->orderBy('toTime', 'asc') ->get() ->toArray(); $data = [ |