Add total messages to domain view, and improve echoarea stats query
This commit is contained in:
@@ -70,7 +70,7 @@ class Echoarea extends Model
|
||||
|
||||
/* METHODS */
|
||||
|
||||
public function messages_count(int $period): int
|
||||
public function messages_count(int $period=NULL): int
|
||||
{
|
||||
$eo = Echomail::cacheFor(self::CACHE_TIME)
|
||||
->where('echoarea_id',$this->id);
|
||||
@@ -87,6 +87,10 @@ class Echoarea extends Model
|
||||
case 30: // month
|
||||
$eo->where('datetime','>=',$dt->subMonth());
|
||||
break;
|
||||
|
||||
case NULL: // all
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user