I'm actually looking for similar functionality. Were you ever able to get this one figured out?
I suggest you get all permissions first:
Pemission::all() or list()
then on your view, you can iterate over the list with the checkboxes
@foreach($permissions as $permission)
<input type='checkbox' value='{{$permission->id}}' {{$user->can($permission->name) ? 'checked':''}}>{{$permission->name}}</input>
@endforeach
notice the $user->can() will determine if the user has this permission. please note that I typed this directly here without testing the code. adjust accrodingly.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community