aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/Http/Controllers')
-rw-r--r--app/Http/Controllers/PagesController.php52
-rw-r--r--app/Http/Controllers/SpecialCallsController.php43
2 files changed, 55 insertions, 40 deletions
diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php
index f42ae3e..c30f923 100644
--- a/app/Http/Controllers/PagesController.php
+++ b/app/Http/Controllers/PagesController.php
@@ -18,11 +18,6 @@ class PagesController extends Controller
return view('pages.index');
}
- public function sponsoring(Request $request)
- {
- return view('pages.sponsoring');
- }
-
public function news(Request $request)
{
$news = Post::all();
@@ -36,44 +31,15 @@ class PagesController extends Controller
return view('pages.gallery');
}
- public function login(Request $request)
- {
- return view('pages.login');
- }
-
- public function logout(Request $request)
- {
- Auth::logout();
- return Redirect::back();
- }
-
- public function activities(Request $request)
- {
- return view('pages.activities');
- }
-
- public function reserve(Request $request)
+ public function sponsoring(Request $request)
{
- return view('pages.reserve');
+ return view('pages.sponsoring');
}
- public function reserveForm(Request $request)
+ // LOGIN SYSTEM
+ public function login(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.');
+ return view('pages.login');
}
public function loginForm(Request $request)
@@ -107,8 +73,14 @@ class PagesController extends Controller
else return Redirect::back()
->withErrors(['failed' => ['Bad credentials!']]);
}
-
+ public function logout(Request $request)
+ {
+ Auth::logout();
+ return Redirect::back();
+ }
+
+ // NOTES
//public function services()
//{
////$title = 'Some title';
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.');
+ }
+}