Files
onboard/app/Services/StationarBranchService.php
2026-04-21 10:08:14 +09:00

25 lines
670 B
PHP

<?php
namespace App\Services;
use App\Models\MisStationarBranch;
use Illuminate\Support\Facades\Cache;
class StationarBranchService
{
/**
* Получение идентификаторов приемных отделений. Кешируется на 24ч
* @return array
*/
public function getWardIds(): array
{
return Cache::tags(['wards_ids'])
->remember('branch_ward_ids', now()->addHours(24), function () {
return MisStationarBranch::query()
->where('IsHospitalWard', 1)
->pluck('StationarBranchID')
->toArray();
});
}
}