0👍
✅
Adding []
to the name of an input field is only useful when you have multiple input fields with this name. It does not convert the value of a single field to an array.
So you can just remove the []
from the name and do a simple explode
on the string to make it an array.
dd(explode(',', $request->grantedUsers));
Source:stackexchange.com