@extends('admin.app') @section('page_title','Edit Role Permission') @section('page_location') @endsection @section('main-content')

Edit Role Permission

{{ Form::model($role,['route' => ['role.update' , $role->id ],'method' => 'PUT','class' => 'form' ,'id' =>'createroomsform','files' => true] ) }}
{!! Form::label('Role Name') !!} {{ Form::label(getrolename($role->id)) }}
@php $counter=0;@endphp @if(count($allpermission)>0) @foreach($allpermission as $row) @php $counter++;@endphp
{!! Form::label($counter) !!}. {!! Form::label($row->name) !!} @php $isexists = isroleExists($role->id,$row->id);@endphp @php $allsubcategory = allSubcategory($row->id);@endphp {!!Form::checkbox('permission[]', $row->id, $isexists); !!}
@if(count($allsubcategory)>0)
@foreach($allsubcategory as $val) @php $sub_isexists = isroleExists($role->id,$val['id']);@endphp {!! Form::label($val['name']) !!} {!!Form::checkbox('permission[]', $val['id'], $sub_isexists); !!}
@endforeach
@endif
@endforeach @endif
{!! Form::submit('Update!!', array('class'=>'btn btn-primary')) !!}
{!! Form::close() !!}
@endsection