diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 30020a5..cb412d4 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -2,6 +2,7 @@
namespace App\Http;
+use App\Http\Middleware\AuthMiddleware;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
@@ -39,6 +40,10 @@ class Kernel extends HttpKernel
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
+ 'auth' => [
+ AuthMiddleware::class
+ ],
+
'api' => [
'throttle:api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
diff --git a/app/Http/Middleware/AuthMiddleware.php b/app/Http/Middleware/AuthMiddleware.php
new file mode 100644
index 0000000..598576c
--- /dev/null
+++ b/app/Http/Middleware/AuthMiddleware.php
@@ -0,0 +1,27 @@
+
-
@foreach($galleries as $gallery)
@@ -19,9 +18,7 @@
-
@endforeach
-
diff --git a/routes/web.php b/routes/web.php
index 9b6771e..dd2a0aa 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -27,7 +27,7 @@ Route::post("/register", [\App\Http\Controllers\AccountController::class, 'regis
Route::get("/login", [\App\Http\Controllers\AccountController::class, 'loginView']);
Route::post("/login", [\App\Http\Controllers\AccountController::class, 'login']);
-Route::middleware([\App\Http\Middleware\TenanMiddleware::class])->group(function () {
+Route::middleware([\App\Http\Middleware\TenanMiddleware::class, \App\Http\Middleware\AuthMiddleware::class])->group(function () {
Route::get("/d", [\App\Http\Controllers\DashboardController::class, 'dashboardView']);
Route::get("/t/new", [\App\Http\Controllers\TenantController::class, 'newView']);