laravel / nova-issues

554 stars 34 forks source link

Multiselect for Actions not working anymore(Uuid Resource) #6514

Closed MBeckers closed 4 weeks ago

MBeckers commented 4 weeks ago

Description:

With Introduction of Change Fix ActionRequest inconsistently receiving comma separated string instead of array. in Laravel Nova 4.35.0

$query = $this->viaRelationship()
            ? $this->modelsViaRelationship()
            : $this->toQueryWithoutScopes()->whereKey(Arr::wrap($this->resources));

Instead of

$query = $this->viaRelationship()
            ? $this->modelsViaRelationship()
            : $this->toQueryWithoutScopes()->whereKey(explode(',', $this->resources));

Will cause to wrap the resources string into an array which will look like

[
     0 => ”firstId,secondId”
]

Thus the Request

It might be only happen for Uuids, i had not the time to dig if this issue occurs also for integer IDs