From 20d308b7becb13ea4aaf2f292debee8ee753cc1f Mon Sep 17 00:00:00 2001 From: cp6 Date: Thu, 13 Oct 2022 13:43:09 +1100 Subject: [PATCH] Removed unused labels.label with Removed unused labels.label with --- app/Http/Controllers/DNSController.php | 2 +- app/Models/Domains.php | 4 ++-- app/Models/Reseller.php | 4 ++-- app/Models/SeedBoxes.php | 4 ++-- app/Models/Server.php | 10 +++++----- app/Models/Shared.php | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/DNSController.php b/app/Http/Controllers/DNSController.php index 8864e55..d1de0d8 100644 --- a/app/Http/Controllers/DNSController.php +++ b/app/Http/Controllers/DNSController.php @@ -82,7 +82,7 @@ class DNSController extends Controller $labels = DB::table('labels_assigned as l') ->join('labels', 'l.label_id', '=', 'labels.id') ->where('l.service_id', '=', $dn->id) - ->get(['labels.id', 'labels.label']); + ->get(['labels.id']); return view('dns.edit', compact(['dn', 'labels', 'Servers', 'Domains', 'Shareds', 'Resellers'])); } diff --git a/app/Models/Domains.php b/app/Models/Domains.php index c6cb7d0..0fd0150 100644 --- a/app/Models/Domains.php +++ b/app/Models/Domains.php @@ -23,7 +23,7 @@ class Domains extends Model public static function allDomains() {//All domains and relationships (no using joins) return Cache::remember("all_domains", now()->addMonth(1), function () { - return Domains::with(['provider', 'price', 'labels', 'labels.label'])->get(); + return Domains::with(['provider', 'price', 'labels'])->get(); }); } @@ -31,7 +31,7 @@ class Domains extends Model {//Single domains and relationships (no using joins) return Cache::remember("domain.$domain_id", now()->addMonth(1), function () use ($domain_id) { return Domains::where('id', $domain_id) - ->with(['provider', 'price', 'labels', 'labels.label'])->first(); + ->with(['provider', 'price', 'labels'])->first(); }); } diff --git a/app/Models/Reseller.php b/app/Models/Reseller.php index 88eec65..312e8c5 100644 --- a/app/Models/Reseller.php +++ b/app/Models/Reseller.php @@ -36,7 +36,7 @@ class Reseller extends Model public static function allResellerHosting() {//All reseller hosting and relationships (no using joins) return Cache::remember("all_reseller", now()->addMonth(1), function () { - return Reseller::with(['location', 'provider', 'price', 'ips', 'labels', 'labels.label'])->get(); + return Reseller::with(['location', 'provider', 'price', 'ips', 'labels'])->get(); }); } @@ -44,7 +44,7 @@ class Reseller extends Model {//Single reseller hosting and relationships (no using joins) return Cache::remember("reseller_hosting.$shared_id", now()->addMonth(1), function () use ($shared_id) { return Reseller::where('id', $shared_id) - ->with(['location', 'provider', 'price', 'ips', 'labels', 'labels.label'])->first(); + ->with(['location', 'provider', 'price', 'ips', 'labels'])->first(); }); } diff --git a/app/Models/SeedBoxes.php b/app/Models/SeedBoxes.php index 17b025b..3fe0d32 100644 --- a/app/Models/SeedBoxes.php +++ b/app/Models/SeedBoxes.php @@ -36,7 +36,7 @@ class SeedBoxes extends Model public static function allSeedboxes() {//All seedboxes and relationships (no using joins) return Cache::remember("all_seedboxes", now()->addMonth(1), function () { - return SeedBoxes::with(['location', 'provider', 'price', 'labels.label'])->get(); + return SeedBoxes::with(['location', 'provider', 'price'])->get(); }); } @@ -44,7 +44,7 @@ class SeedBoxes extends Model {//Single seedbox and relationships (no using joins) return Cache::remember("seedbox.$seedbox_id", now()->addMonth(1), function () use ($seedbox_id) { return SeedBoxes::where('id', $seedbox_id) - ->with(['location', 'provider', 'price', 'labels.label'])->first(); + ->with(['location', 'provider', 'price'])->first(); }); } diff --git a/app/Models/Server.php b/app/Models/Server.php index d42689e..f34357e 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -43,7 +43,7 @@ class Server extends Model public static function allServers() {//All servers and relationships (no using joins) return Cache::remember("all_servers", now()->addMonth(1), function () { - return Server::with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label'])->get(); + return Server::with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels'])->get(); }); } @@ -51,7 +51,7 @@ class Server extends Model {//Single server and relationships (no using joins) return Cache::remember("server.$server_id", now()->addMonth(1), function () use ($server_id) { return Server::where('id', $server_id) - ->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label'])->first(); + ->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels'])->first(); }); } @@ -59,7 +59,7 @@ class Server extends Model {//All ACTIVE servers and relationships replaces activeServersDataIndexPage() return Cache::remember("all_active_servers", now()->addMonth(1), function () { return Server::where('active', '=', 1) - ->with(['location', 'provider', 'os', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label', 'price'])->get(); + ->with(['location', 'provider', 'os', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'price'])->get(); }); } @@ -67,7 +67,7 @@ class Server extends Model {//All NON ACTIVE servers and relationships replaces nonActiveServersDataIndexPage() return Cache::remember("non_active_servers", now()->addMonth(1), function () { return Server::where('active', '=', 0) - ->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label']) + ->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels']) ->get(); }); } @@ -76,7 +76,7 @@ class Server extends Model {//server data that will be publicly viewable (values in settings) return Cache::remember("public_server_data", now()->addMonth(1), function () { return Server::where('show_public', '=', 1) - ->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label']) + ->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels']) ->get(); }); } diff --git a/app/Models/Shared.php b/app/Models/Shared.php index 4d2eec8..c5b116b 100644 --- a/app/Models/Shared.php +++ b/app/Models/Shared.php @@ -36,7 +36,7 @@ class Shared extends Model public static function allSharedHosting() {//All shared hosting and relationships (no using joins) return Cache::remember("all_shared", now()->addMonth(1), function () { - return Shared::with(['location', 'provider', 'price', 'ips', 'labels', 'labels.label'])->get(); + return Shared::with(['location', 'provider', 'price', 'ips', 'labels'])->get(); }); } @@ -44,7 +44,7 @@ class Shared extends Model {//Single shared hosting and relationships (no using joins) return Cache::remember("shared_hosting.$shared_id", now()->addMonth(1), function () use ($shared_id) { return Shared::where('id', $shared_id) - ->with(['location', 'provider', 'price', 'ips', 'labels', 'labels.label'])->first(); + ->with(['location', 'provider', 'price', 'ips', 'labels'])->first(); }); }