[Vuejs]-How to fix an array input value with Laravel / Vue JS

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));

Leave a comment