This commit is contained in:
2025-04-22 20:05:40 +05:00
parent 679c040aca
commit 204b302768
3 changed files with 100 additions and 2 deletions

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 @@ class LoanTypeRepo
*/
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,
);
}
/**