This commit is contained in:
nurmuhammet committed 2025-04-22 20:05:40 +05:00
1 parent 679c040aca
commit 204b302768
3 files changed
+100 -2

No files matched your search

+10 -2
View File
@@ -14,7 +14,11 @@ class LoanTypeRepo
*/
public static function values(): Collection|array
{
return LoanType::where('active', true)->pluck('name', 'id');
return cached(
'loan-types-plucked',
LoanType::where('active', true)->pluck('name', 'id'),
60 * 60,
);
}
/**
@@ -24,7 +28,11 @@ public static function values(): Collection|array
*/
public static function onlyGuarantor(): Collection|array
{
return LoanType::where('active', true)->where('id', static::loanTypeGuarantorId())->pluck('name', 'id');
return cached(
'only-guarantor-plucked',
LoanType::where('active', true)->where('id', static::loanTypeGuarantorId())->pluck('name', 'id'),
60 * 60,
);
}
/**