cschoeni
3 years ago

Problem with selected Forms in Edit view

Posted 3 years ago by cschoeni

Hello Guys I have in my CRUD a problem. All Fields give output the value from DB. But not the multiple selected forms.

public function edit($id) { $group = Group::findOrFail($id); $permissions = Permission::lists('name', 'id');

    return view ('admin.groups.edit', compact('group', 'permissions', 'test'));
}

{!! Form::model($group, ['method' => 'PATCH', 'class' => 'form-horizontal', 'action' => ['GroupController@update', $group->id]]) !!} @include('admin.groups.form', ['btnName' => 'Update']) {!! Form::close() !!}

{!! Form::label('permission_list', 'Permissions', ['class' => 'col-sm-2 control-label']) !!} {!! Form::select('permission_list[]', $permissions, null, ['class' => 'form-control', 'multiple'=>'multiple', 'id' => 'permissions']) !!}

Please sign in or create an account to participate in this conversation.