@extends('layouts.admin') @section('content') @php $readonly=''; @endphp @if($action=='View') @php $readonly='readonly'; @endphp @endif

{{ __($title) }}

@if($action == 'Edit')
{{ method_field('PUT') }} @else @endif @csrf
@if(old('name')) @php $name = old('name') @endphp @elseif(isset($record->name) && $record->name != '') @php $name = $record->name; @endphp @else @php $name = ''; @endphp @endif @if(isset($rolePermissions) && $rolePermissions->permissions_ids != '') @php $permissions_ids = $rolePermissions->permissions_ids; @endphp @else @php $permissions_ids = ''; @endphp @endif @error('name') {{ $message }} @enderror

Permissions:     @if($action!='View') All @endif

@error('permission') {{ $message }} @enderror
@foreach($permissionsModules as $module)
{{ $module->name }}
@foreach($module->permissions as $row) @php $check='' @endphp @if(in_array($row->id, $rolePermissions)) @php $check='checked' @endphp @endif
@endforeach @endforeach
@if($action!='View') @endif {!! ($action!='View') ? 'Cancel' : 'Back' !!}
@endsection @push('scripts') @endpush