I'm working with laravel, and I'm a bit stuck in getting the right structure I want of the value, so I have a check box like this:
<input type="checkbox" name="permission[]" value="{{$permission->slug}}"> {{$permission->name}}
And this outputs me this:
array:2 [
0 => "dashboard.view"
1 => "user.edit"
]
But what I really need to store is something like this:
{"dashboard.view":true,"user.edit":true}