hasOne('App\Models\PromotionType', 'id', 'promotion_type_id') ->select(['id', 'name', 'language_key', 'parent_id', 'type_code', 'order_number', 'status']); } public function getDaysArrayAttribute() { if (!is_null($this->days)) { return json_decode($this->days, 1); } else { return null; } } public function getExcludeDatesArrayAttribute() { if (!is_null($this->exclude_dates)) { return json_decode($this->exclude_dates, 1); } else { return null; } } }