From 6bbbc232bd081449a2fda45ccaa5a34ce5971478 Mon Sep 17 00:00:00 2001 From: cp6 Date: Sun, 20 Aug 2023 21:25:45 +1000 Subject: [PATCH] Removed un-needed imports in Controllers --- app/Http/Controllers/ApiController.php | 2 -- app/Http/Controllers/DNSController.php | 5 ++--- app/Http/Controllers/HomeController.php | 3 --- app/Http/Controllers/IPsController.php | 2 -- app/Http/Controllers/LabelsController.php | 5 ----- app/Http/Controllers/MiscController.php | 1 - app/Http/Controllers/NoteController.php | 1 - app/Http/Controllers/ProvidersController.php | 2 -- app/Http/Controllers/ResellerController.php | 3 --- app/Http/Controllers/SeedBoxesController.php | 3 --- app/Http/Controllers/ServerController.php | 1 - app/Http/Controllers/SharedController.php | 1 - app/Http/Controllers/YabsController.php | 1 - 13 files changed, 2 insertions(+), 28 deletions(-) diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index 923f8e0..4a31c7d 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers; -use App\Models\DiskSpeed; use App\Models\Domains; use App\Models\IPs; use App\Models\Labels; @@ -17,7 +16,6 @@ use App\Models\Server; use App\Models\Shared; use App\Models\User; use App\Models\Yabs; -use App\Process; use DataTables; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; diff --git a/app/Http/Controllers/DNSController.php b/app/Http/Controllers/DNSController.php index 964dabd..8c9d635 100644 --- a/app/Http/Controllers/DNSController.php +++ b/app/Http/Controllers/DNSController.php @@ -8,7 +8,6 @@ use App\Models\Reseller; use App\Models\Server; use App\Models\Domains; use App\Models\Shared; -use Carbon\Carbon; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB; @@ -91,7 +90,7 @@ class DNSController extends Controller return view('dns.edit', compact(['dn', 'labels', 'Servers', 'Domains', 'Shareds', 'Resellers'])); } - public function update(Request $request, DNS $dn) + public function update(Request $request, DNS $dn): \Illuminate\Http\RedirectResponse { $request->validate([ 'hostname' => 'required|string|min:2', @@ -121,7 +120,7 @@ class DNSController extends Controller ->with('success', 'DNS updated Successfully.'); } - public function destroy(DNS $dn) + public function destroy(DNS $dn): \Illuminate\Http\RedirectResponse { if ( $dn->delete()){ Cache::forget('dns_count'); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 64c900f..801db00 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -7,9 +7,6 @@ use App\Models\Home; use App\Models\Labels; use App\Models\Pricing; use App\Models\Settings; -use Carbon\Carbon; -use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\DB; use App\Process; use Illuminate\Support\Facades\Session; diff --git a/app/Http/Controllers/IPsController.php b/app/Http/Controllers/IPsController.php index 611da9f..250beb5 100644 --- a/app/Http/Controllers/IPsController.php +++ b/app/Http/Controllers/IPsController.php @@ -2,14 +2,12 @@ namespace App\Http\Controllers; -use App\Models\DNS; use App\Models\IPs; use App\Models\Reseller; use App\Models\SeedBoxes; use App\Models\Server; use App\Models\Shared; use Illuminate\Http\Request; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; class IPsController extends Controller diff --git a/app/Http/Controllers/LabelsController.php b/app/Http/Controllers/LabelsController.php index 7db1e63..dc4fd09 100644 --- a/app/Http/Controllers/LabelsController.php +++ b/app/Http/Controllers/LabelsController.php @@ -54,11 +54,6 @@ class LabelsController extends Controller return view('labels.show', compact(['label', 'labels'])); } - public function edit(Labels $label) - { - abort(404); - } - public function destroy(Labels $label) { if ($label->delete()) { diff --git a/app/Http/Controllers/MiscController.php b/app/Http/Controllers/MiscController.php index 5d025c2..823ec3b 100644 --- a/app/Http/Controllers/MiscController.php +++ b/app/Http/Controllers/MiscController.php @@ -7,7 +7,6 @@ use App\Models\Misc; use App\Models\Pricing; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; class MiscController extends Controller diff --git a/app/Http/Controllers/NoteController.php b/app/Http/Controllers/NoteController.php index 038b84d..6ba8a93 100644 --- a/app/Http/Controllers/NoteController.php +++ b/app/Http/Controllers/NoteController.php @@ -7,7 +7,6 @@ use App\Models\Domains; use App\Models\IPs; use App\Models\Note; use App\Models\Reseller; -use App\Models\SeedBoxes; use App\Models\Server; use App\Models\Shared; use Illuminate\Http\Request; diff --git a/app/Http/Controllers/ProvidersController.php b/app/Http/Controllers/ProvidersController.php index 1bafae1..1b02323 100644 --- a/app/Http/Controllers/ProvidersController.php +++ b/app/Http/Controllers/ProvidersController.php @@ -3,10 +3,8 @@ namespace App\Http\Controllers; use App\Models\Providers; -use DataTables; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\DB; class ProvidersController extends Controller { diff --git a/app/Http/Controllers/ResellerController.php b/app/Http/Controllers/ResellerController.php index 4066b44..cd52b42 100644 --- a/app/Http/Controllers/ResellerController.php +++ b/app/Http/Controllers/ResellerController.php @@ -5,13 +5,10 @@ namespace App\Http\Controllers; use App\Models\Home; use App\Models\IPs; use App\Models\Labels; -use App\Models\Locations; use App\Models\Pricing; -use App\Models\Providers; use App\Models\Reseller; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; class ResellerController extends Controller diff --git a/app/Http/Controllers/SeedBoxesController.php b/app/Http/Controllers/SeedBoxesController.php index 2ca1821..85a148d 100644 --- a/app/Http/Controllers/SeedBoxesController.php +++ b/app/Http/Controllers/SeedBoxesController.php @@ -3,14 +3,11 @@ namespace App\Http\Controllers; use App\Models\Home; -use App\Models\IPs; use App\Models\Labels; use App\Models\Pricing; use App\Models\SeedBoxes; -use App\Models\Shared; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; class SeedBoxesController extends Controller diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 7622eb5..293e12f 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -10,7 +10,6 @@ use App\Models\Settings; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; -use Illuminate\Support\Facades\DB; class ServerController extends Controller { diff --git a/app/Http/Controllers/SharedController.php b/app/Http/Controllers/SharedController.php index 7f90a8b..1815d2e 100644 --- a/app/Http/Controllers/SharedController.php +++ b/app/Http/Controllers/SharedController.php @@ -9,7 +9,6 @@ use App\Models\Pricing; use App\Models\Shared; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; class SharedController extends Controller diff --git a/app/Http/Controllers/YabsController.php b/app/Http/Controllers/YabsController.php index 56839c8..c8ee66c 100644 --- a/app/Http/Controllers/YabsController.php +++ b/app/Http/Controllers/YabsController.php @@ -4,7 +4,6 @@ namespace App\Http\Controllers; use App\Models\Server; use App\Models\Yabs; -use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB;