From 4616feacdaacfb3b027ba117dc9c33c7d53d8af0 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 5 Oct 2023 23:28:18 +1100 Subject: [PATCH] Fix some redirects now that self::class,'home' is no longer defined --- app/Http/Controllers/DomainController.php | 2 +- app/Http/Controllers/EchoareaController.php | 2 +- app/Http/Controllers/FileareaController.php | 2 +- app/Http/Controllers/SystemController.php | 2 +- app/Http/Controllers/UserController.php | 2 +- app/Http/Controllers/ZoneController.php | 2 +- resources/views/layouts/partials/sidebar.blade.php | 2 +- resources/views/user/addedit.blade.php | 2 +- routes/web.php | 3 ++- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/DomainController.php b/app/Http/Controllers/DomainController.php index 74eb35f..cafc714 100644 --- a/app/Http/Controllers/DomainController.php +++ b/app/Http/Controllers/DomainController.php @@ -24,7 +24,7 @@ class DomainController extends Controller $o->save(); - return redirect()->action([self::class,'home']); + return redirect()->to('domain'); } return view('domain.addedit') diff --git a/app/Http/Controllers/EchoareaController.php b/app/Http/Controllers/EchoareaController.php index 085a562..c2fb5b5 100644 --- a/app/Http/Controllers/EchoareaController.php +++ b/app/Http/Controllers/EchoareaController.php @@ -35,7 +35,7 @@ class EchoareaController extends Controller $o->save(); - return redirect()->action([self::class,'home']); + return redirect()->to('echoarea'); } return view('echoarea.addedit') diff --git a/app/Http/Controllers/FileareaController.php b/app/Http/Controllers/FileareaController.php index 92613d9..89d61be 100644 --- a/app/Http/Controllers/FileareaController.php +++ b/app/Http/Controllers/FileareaController.php @@ -40,7 +40,7 @@ class FileareaController extends Controller $o->domain->save(); } - return redirect()->action([self::class,'home']); + return redirect()->to('filearea'); } return view('filearea.addedit') diff --git a/app/Http/Controllers/SystemController.php b/app/Http/Controllers/SystemController.php index 4d07174..091ed0b 100644 --- a/app/Http/Controllers/SystemController.php +++ b/app/Http/Controllers/SystemController.php @@ -50,7 +50,7 @@ class SystemController extends Controller $o->mailers()->sync($mailers); - return redirect()->action([self::class,'home']); + return redirect()->to('system'); } $o->load(['addresses.zone.domain','addresses.system','sessions.domain','sessions.systems']); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 10e17a0..a18537c 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -29,7 +29,7 @@ class UserController extends Controller if ($o->wasRecentlyCreated) event(new Registered($o)); - return redirect()->action([self::class,'home']); + return redirect()->to('user'); } return view('user.addedit') diff --git a/app/Http/Controllers/ZoneController.php b/app/Http/Controllers/ZoneController.php index c96bf5a..09336ed 100644 --- a/app/Http/Controllers/ZoneController.php +++ b/app/Http/Controllers/ZoneController.php @@ -96,7 +96,7 @@ class ZoneController extends Controller $ao->active = TRUE; $o->addresses()->save($ao); - return redirect()->action([self::class,'home']); + return redirect()->to('zone'); } return view('zone.addedit') diff --git a/resources/views/layouts/partials/sidebar.blade.php b/resources/views/layouts/partials/sidebar.blade.php index 2d06932..6f88931 100644 --- a/resources/views/layouts/partials/sidebar.blade.php +++ b/resources/views/layouts/partials/sidebar.blade.php @@ -42,7 +42,7 @@
Users
Create
-
List
+
List
@endcan @endauth diff --git a/resources/views/user/addedit.blade.php b/resources/views/user/addedit.blade.php index 6f7f9ac..fd01657 100644 --- a/resources/views/user/addedit.blade.php +++ b/resources/views/user/addedit.blade.php @@ -119,7 +119,7 @@
- Cancel + Cancel @can('admin',$o) @endcan diff --git a/routes/web.php b/routes/web.php index abf7cde..4076d27 100644 --- a/routes/web.php +++ b/routes/web.php @@ -138,7 +138,8 @@ Route::middleware(['auth','can:admin'])->group(function () { Route::get('echomail/view/{o}',[EchomailController::class,'view']); Route::get('netmail/view/{o}',[NetmailController::class,'view']); Route::match(['get','post'],'setup',[HomeController::class,'setup']); + + Route::view('user','user.home'); Route::match(['get','post'],'user/addedit/{o?}',[UserController::class,'add_edit']) ->where('o','[0-9]+'); - Route::view('user/list','user.home'); }); \ No newline at end of file