{{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'user-forum-topic.update', 'method' => 'POST']) }}
@php
$edit = true;
@endphp
@isset($edit)
@php
$role_ids = json_decode($my_topic->available_for);
$role_ids = is_array($role_ids) ? $role_ids : [];
@endphp
@endisset
@foreach($roles as $rl)
@php
$custom_id = $rl->id.rand(10,1000);
@endphp
id, $role_ids)) checked @endif @endisset>
@endforeach
@if($errors->has('role'))
{{ $errors->first('role') }}
@endif
{{ Form::close() }}