Skip to content

Commit

Permalink
Use Entry model to get disabled IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
afonic committed Feb 7, 2025
1 parent 0d01050 commit e3e8406
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Models/Availability.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use Reach\StatamicResrv\Traits\HandlesMultisiteIds;
use Reach\StatamicResrv\Traits\HandlesPricing;
use Statamic\Facades\Blueprint;
use Statamic\Facades\Entry as StatamicEntry;

class Availability extends Model implements AvailabilityContract
{
Expand Down Expand Up @@ -366,10 +365,8 @@ protected function getProperty($results, $statamic_id, $singleItem = false)

protected function getDisabledIds()
{
$results = StatamicEntry::query()
->where('resrv_availability', 'disabled')
->where('published', true)
->get('id')
$results = Entry::where('enabled', 0)
->get('item_id')
->toArray();

return Arr::flatten($results);
Expand Down

0 comments on commit e3e8406

Please sign in to comment.