From 66cf78ba75a20a554f787225b052d94333ed743e Mon Sep 17 00:00:00 2001 From: Ro Date: Wed, 16 Aug 2023 13:03:06 -0700 Subject: [PATCH] Added Template Files, Grouped Den Routes Added the necessary template files for every page needed. Most are still empty but all are accounted for from the previous version. Also organized all routes to the dashboard, named the den for better security --- app/Http/Controllers/AuthController.php | 2 +- app/Http/Controllers/DenController.php | 6 ++++ app/Http/Controllers/FrontIndexController.php | 2 +- resources/views/back/locations.blade.php | 0 .../views/{front => back}/login.blade.php | 0 resources/views/back/member.blade.php | 4 +++ resources/views/front/about.blade.php | 0 resources/views/front/exports.blade.php | 0 resources/views/front/index.blade.php | 31 ++++++++++++++++--- resources/views/front/listing.blade.php | 0 resources/views/front/location.blade.php | 0 routes/web.php | 11 ++++--- 12 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 resources/views/back/locations.blade.php rename resources/views/{front => back}/login.blade.php (100%) create mode 100644 resources/views/back/member.blade.php create mode 100644 resources/views/front/about.blade.php create mode 100644 resources/views/front/exports.blade.php create mode 100644 resources/views/front/listing.blade.php create mode 100644 resources/views/front/location.blade.php diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 4c69f42..3c012b6 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -13,7 +13,7 @@ class AuthController extends Controller //$token = $request->session()->token(); //$token = csrf_token(); - return view('front.login'); + return view('back.login'); } public function memberAuth(Request $request): Response diff --git a/app/Http/Controllers/DenController.php b/app/Http/Controllers/DenController.php index 22a3eee..14bfc9d 100644 --- a/app/Http/Controllers/DenController.php +++ b/app/Http/Controllers/DenController.php @@ -13,4 +13,10 @@ class DenController extends Controller $member = Auth::user(); return view('back.start', ['handle' => $member->handle]); } + + public function member(Request $request) + { + $member = Auth::user(); + return view('back.member', ['handle' => $member->handle]); + } } diff --git a/app/Http/Controllers/FrontIndexController.php b/app/Http/Controllers/FrontIndexController.php index 652ebb8..8f6c7d1 100644 --- a/app/Http/Controllers/FrontIndexController.php +++ b/app/Http/Controllers/FrontIndexController.php @@ -9,7 +9,7 @@ class FrontIndexController extends Controller { public function start() { - $locations = Location::all(); + $locations = Location::where("active", true)->get(); $count = count($locations); $terms = "no|agenda"; diff --git a/resources/views/back/locations.blade.php b/resources/views/back/locations.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/front/login.blade.php b/resources/views/back/login.blade.php similarity index 100% rename from resources/views/front/login.blade.php rename to resources/views/back/login.blade.php diff --git a/resources/views/back/member.blade.php b/resources/views/back/member.blade.php new file mode 100644 index 0000000..017c4ec --- /dev/null +++ b/resources/views/back/member.blade.php @@ -0,0 +1,4 @@ +
+

Mmeber Stuff

+ Hey {{$handle}} +
\ No newline at end of file diff --git a/resources/views/front/about.blade.php b/resources/views/front/about.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/front/exports.blade.php b/resources/views/front/exports.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/front/index.blade.php b/resources/views/front/index.blade.php index adcaec7..160c833 100644 --- a/resources/views/front/index.blade.php +++ b/resources/views/front/index.blade.php @@ -1,10 +1,31 @@ -@extends('frame') +@extends('frame') @section('title', 'This is The Bad Space') -@section('main-content') + @section('main-content') @parent -

This is where we start

- {{ $count }} -@endsection +
+
+
+
+ + +
+
+ + +
+ + {{$count}} + Bad Spaces tracked. Shot by + Ussama Azam +
+ +
+ + +
+ @endsection \ No newline at end of file diff --git a/resources/views/front/listing.blade.php b/resources/views/front/listing.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/front/location.blade.php b/resources/views/front/location.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/routes/web.php b/routes/web.php index d361360..fc3fd94 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,13 +16,16 @@ use App\Http\Controllers\DenController; | */ -//index +//front Route::get("/", [FrontIndexController::class, 'start']); //auth Route::get("/login", [AuthController::class, 'showLogin']); Route::post("/login", [AuthController::class, 'memberAuth']); - -//den -Route::get("/den", [DenController::class, 'start'])->middleware('member.check'); Route::get("/logout", [AuthController::class, 'leave']); + +//back +Route::group(['prefix' => 'den', 'middleware' => 'member.check'], function () { + Route::get("/", [DenController::class, 'start']); + Route::get("/member", [DenController::class, 'member']); +});