aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-10-31 22:02:26 +0100
committerMateja <mail@matejamaric.com>2020-10-31 22:02:26 +0100
commit57dff5950b32a5c4c6f8fcddc7ce3b28601792f8 (patch)
tree2bd9fc751162966420a9b130f2d349c7f529d8b9
parentf0b031769c30ef868b2ed0d8bbb666a785983e59 (diff)
downloadyota-laravel-57dff5950b32a5c4c6f8fcddc7ce3b28601792f8.tar.gz
yota-laravel-57dff5950b32a5c4c6f8fcddc7ce3b28601792f8.zip
Add special callsigns controllers.
-rw-r--r--app/Http/Controllers/SpecialCallsController.php20
-rw-r--r--resources/views/inc/special_navbar.blade.php4
-rw-r--r--routes/web.php13
3 files changed, 35 insertions, 2 deletions
diff --git a/app/Http/Controllers/SpecialCallsController.php b/app/Http/Controllers/SpecialCallsController.php
index 153e6b9..8238d94 100644
--- a/app/Http/Controllers/SpecialCallsController.php
+++ b/app/Http/Controllers/SpecialCallsController.php
@@ -94,4 +94,24 @@ class SpecialCallsController extends Controller
return redirect()->route('reserve')->with('status', 'Reservation submitted.');
}
+
+ public function add(Request $request)
+ {
+ return view('pages.callsigns');
+ }
+
+ public function addForm(Request $request)
+ {
+ return Redirect::back();
+ }
+
+ public function reservations(Request $request)
+ {
+ return view('pages.reservations');
+ }
+
+ public function reservationsForm(Request $request)
+ {
+ return Redirect::back();
+ }
}
diff --git a/resources/views/inc/special_navbar.blade.php b/resources/views/inc/special_navbar.blade.php
index de551ba..763a470 100644
--- a/resources/views/inc/special_navbar.blade.php
+++ b/resources/views/inc/special_navbar.blade.php
@@ -17,8 +17,8 @@
Administration
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
- <a class="dropdown-item" href="#">Callsigns</a>
- <a class="dropdown-item" href="#">Reservations</a>
+ <a class="dropdown-item" href="{{ route('addSign') }}">Callsigns</a>
+ <a class="dropdown-item" href="{{ route('reservations') }}">Reservations</a>
</div>
</div>
<a href="{{ route('logout') }}" class="nav-item nav-link">Logout</a>
diff --git a/routes/web.php b/routes/web.php
index 4c20032..1d04dbf 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -40,6 +40,19 @@ Route::get('/special-calls', [SpecialCallsController::class, 'activities'])->nam
Route::get('/special-calls/reserve', [SpecialCallsController::class, 'reserve'])->name('reserve');
Route::post('/special-calls/reserve', [SpecialCallsController::class, 'reserveForm'])->name('reserveForm');
+
+Route::get('/special-calls/add', [SpecialCallsController::class, 'add'])->name('addSign')
+ ->middleware(['auth']);
+Route::post('/special-calls/add', [SpecialCallsController::class, 'addForm'])->name('addSignForm')
+ ->middleware(['auth']);
+
+
+Route::get('/special-calls/reservations', [SpecialCallsController::class, 'reservations'])->name('reservations')
+ ->middleware(['auth']);
+Route::post('/special-calls/reservations', [SpecialCallsController::class, 'reservationsForm'])->name('reservationsForm')
+ ->middleware(['auth']);
+
+
Route::get('/login', [PagesController::class, 'login'])->name('login');
Route::post('/login', [PagesController::class, 'loginForm'])->name('loginForm');
Route::get('/logout', [PagesController::class, 'logout'])->name('logout');