Removed unused labels.label with

Removed unused labels.label with
This commit is contained in:
cp6 2022-10-13 13:43:09 +11:00
parent a1d81a3244
commit 20d308b7be
6 changed files with 14 additions and 14 deletions

View File

@ -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']));
}

View File

@ -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();
});
}

View File

@ -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();
});
}

View File

@ -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();
});
}

View File

@ -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();
});
}

View File

@ -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();
});
}