where('code', $code) ->value('description'); } /** * Получить расшифровку для шифра расценки */ public static function getPricingCodeDescription(?string $code): ?string { if (!$code) { return null; } return self::where('type', self::TYPE_PRICING_CODE) ->where('code', $code) ->value('description'); } /** * Создать или обновить запись справочника */ public static function createOrUpdate(string $type, string $code, string $description): void { self::updateOrCreate( ['type' => $type, 'code' => $code], ['description' => $description] ); } }