If I create a normal action (not standalone or sole) and select several resources, only the first model selected will be in Collection $models of that actions handle method.
Detailed steps to reproduce the issue on a fresh Nova installation:
Create basic resource
Create basic action
Add action to resource
Select multiple resources on overview page and execute action
Only the first model selected will be present in the handle method of the action
Possible issue
I've tried to see where the problem is on our side by digging deeper in the code and came across the following piece of code which I believe to be the root of the issue.
In the file /laravel/nova/src/Http/Requests/ActionRequest.php, the function toSelectedResourceQuery(), if I dump the $this->resources property there I get a string of the ID's instead of the ID's in a collection.
Description:
If I create a normal action (not standalone or sole) and select several resources, only the first model selected will be in
Collection $models
of that actions handle method.Detailed steps to reproduce the issue on a fresh Nova installation:
Possible issue
I've tried to see where the problem is on our side by digging deeper in the code and came across the following piece of code which I believe to be the root of the issue.
In the file /laravel/nova/src/Http/Requests/ActionRequest.php, the function toSelectedResourceQuery(), if I dump the
$this->resources
property there I get a string of the ID's instead of the ID's in a collection.