modified: .gitignore
This commit is contained in:
@@ -2,7 +2,23 @@
|
||||
|
||||
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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user