'date' ]; protected $fillable = [ 'active', 'inactive', 'old_accounts', 'new_accounts', 'total_accounts', 'total_opt_in' ]; protected static function booted() { static::creating(function (BrandStat $stat) { if (!$stat->created_at) { $stat->created_at = Carbon::now(); } }); } public function brand() { return $this->belongsTo(Brand::class); } }