hasMany(GiftCardCodes::class, 'giftcard_id', 'id'); } static $STS = [ 1 => "فعال", 2 => "تمام شده", 3 => "منقضی شده" ]; static $UNIT = [ 1=>'IRR', 2=>'Golden' ]; public function getStsStrAttribute() { return self::$STS[$this->sts] ?? null; } }