filamentphp/filament · error · LogicException

The action [{$this->getName()}] is attempting to access the

Error message

The action [{$this->getName()}] is attempting to access the selected records from the table, but it is not using [accessSelectedRecords()], so they are not available.

What it means

Error "The action [{$this->getName()}] is attempting to access the selected records from the table, but it is not using [accessSelectedRecords()], so they are not available." thrown in filamentphp/filament.

Source

Thrown at packages/actions/src/Concerns/InteractsWithSelectedRecords.php:55

        $this->canAccessSelectedRecords = $condition;

        return $this;
    }

    public function canAccessSelectedRecords(): bool
    {
        return (bool) $this->evaluate($this->canAccessSelectedRecords);
    }

    public function hasCanAccessSelectedRecords(): bool
    {
        return $this->canAccessSelectedRecords !== false;
    }

    public function getSelectedRecords(): EloquentCollection | Collection | LazyCollection
    {
        if (! $this->canAccessSelectedRecords()) {
            throw new LogicException("The action [{$this->getName()}] is attempting to access the selected records from the table, but it is not using [accessSelectedRecords()], so they are not available.");
        }

        $records = $this->getLivewire()->getSelectedTableRecords($this->shouldFetchSelectedRecords(), $this->getSelectedRecordsChunkSize());

        $this->totalSelectedRecordsCount = ($records instanceof LazyCollection)
            ? $this->getLivewire()->getSelectedTableRecordsQuery(shouldFetchSelectedRecords: false)->count()
            : $records->count();
        $this->successfulSelectedRecordsCount = $this->totalSelectedRecordsCount;

        return $records;
    }

    public function getSelectedRecordsQuery(): Builder
    {
        if (! $this->canAccessSelectedRecords()) {
            throw new LogicException("The action [{$this->getName()}] is attempting to access the selected records query from the table, but it is not using [accessSelectedRecords()], so they are not available.");
        }

View on GitHub (pinned to 53483fa934)

When it happens

Trigger: Thrown at packages/actions/src/Concerns/InteractsWithSelectedRecords.php:55 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of filamentphp/filament@53483fa934 (2026-08-17). Data as JSON: /api/errors/c5a9b88e0d3a9deb. Report an issue: GitHub.