@extends('layouts.layout-admin') @section('content')

{{ __('Create Role') }}

{{ __('Update Roles') }}

@csrf {{method_field('PUT')}}
@if($errors->has('name'))

{{ $errors->first('name') }}

@endif
{{ Form::checkbox('select_all',null,null, array('id'=>'select_all','class'=>'class="select_all" custom-control-input')) }} {{Form::label('select_all','Select All',['class'=>'custom-control-label'])}}
@php $modules=['dashboard','customer','merchant','driver','order']; @endphp @foreach($menus as $i => $module) @php $i++; @endphp @endforeach
Module Name Permissions
{{Form::label('module',ucfirst($module))}}
@if(in_array('manage '.strtolower($module),(array) $permissions)) @if($key = array_search('manage '.strtolower($module),$permissions))
{{Form::checkbox('permissions[]','manage '.strtolower($module),in_array('list '.strtolower($module),$assignedPermission), ['class'=>'checkbox custom-control-input','id' =>'permission'.$key])}} {{Form::label('permission'.$key,'Manage',['class'=>'custom-control-label'])}}
@endif @endif @if(in_array('list '.strtolower($module),(array) $permissions)) @if($key = array_search('list '.strtolower($module),$permissions))
{{Form::checkbox('permissions[]','list '.strtolower($module),in_array('list '.strtolower($module),$assignedPermission), ['class'=>'checkbox custom-control-input','id' =>'permission'.$key])}} {{Form::label('permission'.$key,'List',['class'=>'custom-control-label'])}}
@endif @endif @if(in_array('create '.strtolower($module),(array) $permissions)) @if($key = array_search('create '.strtolower($module),$permissions))
{{Form::checkbox('permissions[]','create '.strtolower($module),in_array('create '.strtolower($module),$assignedPermission), ['class'=>'checkbox custom-control-input','id' =>'permission'.$key])}} {{Form::label('permission'.$key,'Create',['class'=>'custom-control-label'])}}
@endif @endif @if(in_array('edit '.strtolower($module),(array) $permissions)) @if($key = array_search('edit '.strtolower($module),$permissions))
{{Form::checkbox('permissions[]','edit '.strtolower($module),in_array('edit '.strtolower($module),$assignedPermission), ['class'=>'checkbox custom-control-input','id' =>'permission'.$key])}} {{Form::label('permission'.$key,'Edit',['class'=>'custom-control-label'])}}
@endif @endif @if(in_array('delete '.strtolower($module),(array) $permissions)) @if($key = array_search('delete '.strtolower($module),$permissions))
{{Form::checkbox('permissions[]','delete '.strtolower($module),in_array('delete '.strtolower($module),$assignedPermission), ['class'=>'checkbox custom-control-input','id' =>'permission'.$key])}} {{Form::label('permission'.$key,'Delete',['class'=>'custom-control-label'])}}
@endif @endif @if(in_array('view '.strtolower($module),(array) $permissions)) @if($key = array_search('view '.strtolower($module),$permissions))
{{Form::checkbox('permissions[]','view '.strtolower($module),in_array('delete '.strtolower($module),$assignedPermission), ['class'=>'checkbox custom-control-input','id' =>'permission'.$key])}} {{Form::label('permission'.$key,'View',['class'=>'custom-control-label'])}}
@endif @endif
Cancel
@endsection @section('scripts') @endsection