diff options
author | Mateja <mail@matejamaric.com> | 2020-10-31 21:10:32 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2020-10-31 21:10:32 +0100 |
commit | 2140f96e655d71c4f388ff102babd306bcaad218 (patch) | |
tree | 661644b7a1f9f2f9fc5bda6f4d25550db1dec58b /app | |
parent | cde26dcfbbc7cc00080492b03cb4f4d8cdb966f6 (diff) | |
download | yota-laravel-2140f96e655d71c4f388ff102babd306bcaad218.tar.gz yota-laravel-2140f96e655d71c4f388ff102babd306bcaad218.zip |
Don't use foreign keys for special calls.
Diffstat (limited to 'app')
-rw-r--r-- | app/Http/Controllers/SpecialCallsController.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/app/Http/Controllers/SpecialCallsController.php b/app/Http/Controllers/SpecialCallsController.php index 421e85d..2f3282d 100644 --- a/app/Http/Controllers/SpecialCallsController.php +++ b/app/Http/Controllers/SpecialCallsController.php @@ -17,20 +17,21 @@ class SpecialCallsController extends Controller { public function activities(Request $request) { - //$activities = Reservation::all(); - $activities = Reservation::addSelect([ - 'specialCall' => SpecialCall::select('sign') - //->whereColumn('reservations.specialCall', 'special_calls.id') - ->whereColumn('specialCall', 'id') - ->limit(1) - ])->get(); + $activities = Reservation::all(); + //$activities = Reservation::addSelect([ + //'specialCall' => SpecialCall::select('sign') + ////->whereColumn('reservations.specialCall', 'special_calls.id') + //->whereColumn('specialCall', 'id') + //->limit(1) + //])->get(); return view('pages.activities', compact('activities')); } public function reserve(Request $request) { - return view('pages.reserve'); + $signs = SpecialCall::all(); + return view('pages.reserve', compact('signs')); } public function reserveForm(Request $request) @@ -79,7 +80,7 @@ class SpecialCallsController extends Controller $reservation = new Reservation(); - $reservation->specialCall = 2; + $reservation->specialCall = $request->scall; $reservation->fromTime = $request->sdate . ' ' . $request->stime; $reservation->toTime = $request->edate . ' ' . $request->etime; $reservation->frequencies = implode(', ', $request->freqs); |