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

{{ __('Create Role') }}

{{ __('Create Roles') }}

@csrf
@if($errors->has('role_name'))

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

@endif
{{ Form::checkbox('select_all',null,null, array('id'=>'select_all','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 $module)
@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),false, ['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),false, ['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),false, ['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),false, ['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),false, ['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),false, ['class'=>'checkbox custom-control-input','id' =>'permission'.$key])}} {{Form::label('permission'.$key,'View',['class'=>'custom-control-label'])}}
@endif @endif
{{ __('Cancel') }}
@endsection @section('scripts') @endsection