aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Controllers/SpecialCallsController.php
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-10-31 11:17:51 +0100
committerMateja <mail@matejamaric.com>2020-10-31 11:17:51 +0100
commit27499b34d0263e4e7429292517acb8d37ee2c8d2 (patch)
tree08da40f21af8ee61e03f2f47a5d5ae2d952b15ac /app/Http/Controllers/SpecialCallsController.php
parent28d2635b53441c00be130a82b37a08e2895e889d (diff)
downloadyota-laravel-27499b34d0263e4e7429292517acb8d37ee2c8d2.tar.gz
yota-laravel-27499b34d0263e4e7429292517acb8d37ee2c8d2.zip
Add SpecialCallsController and titles to views.
Diffstat (limited to 'app/Http/Controllers/SpecialCallsController.php')
-rw-r--r--app/Http/Controllers/SpecialCallsController.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/app/Http/Controllers/SpecialCallsController.php b/app/Http/Controllers/SpecialCallsController.php
new file mode 100644
index 0000000..3a3ab89
--- /dev/null
+++ b/app/Http/Controllers/SpecialCallsController.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use function dd;
+use function redirect;
+
+use Illuminate\Support\Facades\Validator;
+use Illuminate\Support\Facades\Redirect;
+use Illuminate\Support\Facades\Auth;
+
+class SpecialCallsController extends Controller
+{
+ public function activities(Request $request)
+ {
+ return view('pages.activities');
+ }
+
+ public function reserve(Request $request)
+ {
+ return view('pages.reserve');
+ }
+
+ public function reserveForm(Request $request)
+ {
+ $validatedData = $request->validate([
+ 'scall' => 'required|alphanum',
+ 'sdate' => 'required|date',
+ 'stime' => 'required',
+ 'edate' => 'required|date',
+ 'etime' => 'required',
+ 'freqs' => 'required',
+ 'modes' => 'required',
+ 'ocall' => 'required|alphanum',
+ 'oname' => 'required',
+ 'email' => 'required|email',
+ 'phone' => ['required', 'regex:/^[0-9 ]+$/'],
+ ]);
+
+ return redirect('reserve')->with('status', 'Reservation submitted.');
+ }
+}