aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-10-31 20:35:46 +0100
committerMateja <mail@matejamaric.com>2020-10-31 20:35:46 +0100
commitcde26dcfbbc7cc00080492b03cb4f4d8cdb966f6 (patch)
tree5a58a371db84e49e27710c06c49d9697aea762f3
parent07349ee4ceb47b60ff2a30962e2890e56eab2f49 (diff)
downloadyota-laravel-cde26dcfbbc7cc00080492b03cb4f4d8cdb966f6.tar.gz
yota-laravel-cde26dcfbbc7cc00080492b03cb4f4d8cdb966f6.zip
Special Callsign -text- from id.
-rw-r--r--app/Http/Controllers/SpecialCallsController.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/app/Http/Controllers/SpecialCallsController.php b/app/Http/Controllers/SpecialCallsController.php
index 01e7af7..421e85d 100644
--- a/app/Http/Controllers/SpecialCallsController.php
+++ b/app/Http/Controllers/SpecialCallsController.php
@@ -11,12 +11,20 @@ use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Auth;
use App\Models\Reservation;
+use App\Models\SpecialCall;
class SpecialCallsController extends Controller
{
public function activities(Request $request)
{
- $activities = Reservation::all();
+ //$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'));
}
@@ -71,11 +79,11 @@ class SpecialCallsController extends Controller
$reservation = new Reservation();
- $reservation->specialCall = 1;
- $reservation->fromTime = $request->sdate . ' ' . $request->stime;
- $reservation->toTime = $request->edate . ' ' . $request->etime;
- $reservation->frequencies = implode(', ', $request->freqs);
- $reservation->modes = implode(', ', $request->modes);
+ $reservation->specialCall = 2;
+ $reservation->fromTime = $request->sdate . ' ' . $request->stime;
+ $reservation->toTime = $request->edate . ' ' . $request->etime;
+ $reservation->frequencies = implode(', ', $request->freqs);
+ $reservation->modes = implode(', ', $request->modes);
$reservation->operatorCall = $request->ocall;
$reservation->operatorName = $request->oname;
$reservation->operatorEmail = $request->email;