'integer', 'brand' => 'integer', 'year' => 'integer', 'module' => 'integer', 'deleted_at' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'published_status' => 'integer', 'published_at' => 'integer']; public function getCreatedAtAttribute($value): false|string { return $this->format('created_at', function (bool $isFormat) use ($value) { return $isFormat ? date('Y-m-d H:i:s', intval($value)) : $value; }); } public function getModuleAttribute($value) { return $this->format('module', function (bool $isFormat) use ($value) { return $isFormat ? ArticleModuleEnum::from($value)->toString() : $value; }); } public function getImagesAttribute($value) { return $this->format('images', function (bool $isFormat) use ($value) { return $isFormat ? json_decode($value, true) : $value; }); } public function getBrandAttribute($value) { return $this->format('brand', function (bool $isFormat) use ($value) { return $isFormat ? AppBrand::find($value)?->name : $value; }); } public function getPublishedStatusAttribute($value) { return $this->format('published_status', function (bool $isFormat) use ($value) { return $isFormat ? SpiderArticlePublishedStatusEnum::from($value)->toString() : $value; }); } }