Level 1
I had the same problem. In my case the cause was a wrong query in the indexQuery method of the Nova Resource.
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, this drives me crazy, but when I use this specific action, it always gives me ALL models from the table, not only the selected row.
resource:
public function actions(NovaRequest $request): array
{
return [
(new AssignTowingService)
->canSee(function ($request) {
return true;
})
->canRun(function ($request, $user) {
return true;
})
->onlyOnTableRow(),
];
}
action:
public function handle(ActionFields $fields, Collection $models)
{
/** @var Process $model */
foreach ($models as $model) {
$model->state = ProcessStates::IN_PROGRESS;
$model->save();
}
return Action::message('...');
}
$models is never only the clicked current row. Any ideas?
Please or to participate in this conversation.