@extends('layouts.admin.admin') @section('title', 'Create Roles') @section('content')
@include('partials.header') @include('partials.sidebar')
@include('partials.breadcrumbs')
Create Executive User Role
@if(session('error')) @endif
@csrf
@if ($errors->has('name')) {{ $errors->first('name') }} @endif
@foreach($groups as $group)
id") ? 'checked' : '' }}>
@foreach($group->cat_permission as $perm) @php $checked = ''; $split_permname = str_replace(' ', '', strtolower($perm->label)); $name = 'permissions'.str_replace(' ', '', strtolower($group->name)).'access[]'; $permId = $perm->id; $id = str_replace(' ', '', strtolower($group->name)).$split_permname; $isChecked = (string) old("permissions.$group->id") === (string) $permId ? 'checked' : ''; $label = $perm->label; @endphp
@if(!empty($perm->description)) ({{$perm->description}}) @endif
@endforeach @if ($errors->has("permissions.$group->id"))
{{ $errors->first("permissions.$group->id") }}
@endif
{{-- xffbg --}} @endforeach
@if ($errors->has('permissions')) {{ $errors->first('permissions') }} @endif
@stop