mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 15:33:44 +01:00
Updated counts to use Eloquent
This commit is contained in:
parent
65f0474ebe
commit
e100203331
@ -22,7 +22,7 @@ class DNS extends Model
|
|||||||
public static function dnsCount()
|
public static function dnsCount()
|
||||||
{
|
{
|
||||||
return Cache::remember('dns_count', now()->addMonth(1), function () {
|
return Cache::remember('dns_count', now()->addMonth(1), function () {
|
||||||
return DB::table('d_n_s')->count();
|
return DNS::count();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class Labels extends Model
|
|||||||
public static function labelsCount()
|
public static function labelsCount()
|
||||||
{
|
{
|
||||||
return Cache::remember('labels_count', now()->addMonth(1), function () {
|
return Cache::remember('labels_count', now()->addMonth(1), function () {
|
||||||
return DB::table('labels')->count();
|
return Labels::count();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user