diff --git a/app/Abstracts/Model.php b/app/Abstracts/Model.php index 6b2f8482f..230826049 100644 --- a/app/Abstracts/Model.php +++ b/app/Abstracts/Model.php @@ -2,6 +2,7 @@ namespace App\Abstracts; +use App\Traits\DateTime; use App\Traits\Tenants; use GeneaLabs\LaravelModelCaching\Traits\Cachable; use Illuminate\Database\Eloquent\Model as Eloquent; @@ -11,7 +12,7 @@ use Lorisleiva\LaravelSearchString\Concerns\SearchString; abstract class Model extends Eloquent { - use Cachable, SearchString, SoftDeletes, Sortable, Tenants; + use Cachable, DateTime, SearchString, SoftDeletes, Sortable, Tenants; protected $tenantable = true; diff --git a/app/Listeners/Report/AddDate.php b/app/Listeners/Report/AddDate.php index e16274f3d..7a7c83374 100644 --- a/app/Listeners/Report/AddDate.php +++ b/app/Listeners/Report/AddDate.php @@ -39,7 +39,7 @@ class AddDate extends Listener */ public function handleFilterApplying(FilterApplying $event) { - if ($this->skipThisClass($event)) { + if (empty($event->args['date_field'])) { return; }