@extends('backend.layouts.app') @section('title', __('labels.backend.access.roles.management') . ' | ' . __('labels.backend.access.roles.edit')) @section('content') {{ html()->modelForm($role, 'PATCH', route('admin.auth.role.update', $role))->class('form-horizontal')->open() }}

@lang('labels.backend.access.roles.management') @lang('labels.backend.access.roles.edit')


{{ html()->label(__('validation.attributes.backend.access.roles.name')) ->class('col-md-2 form-control-label') ->for('name') }}
{{ html()->text('name') ->class('form-control') ->placeholder(__('validation.attributes.backend.access.roles.name')) ->attribute('maxlength', 191) ->required() }}
{{ html()->label(__('validation.attributes.backend.access.roles.associated_permissions')) ->class('col-md-2 form-control-label') ->for('permissions') }}
@if($permissions->count()) @foreach($permissions as $permission)
{{ html()->label( html()->checkbox('permissions[]', in_array($permission->name, $rolePermissions), $permission->name) ->class('switch-input') ->id('permission-'.$permission->id) . '') ->class('switch switch-label switch-pill switch-primary mr-2') ->for('permission-'.$permission->id) }} {{ html()->label(ucwords($permission->name))->for('permission-'.$permission->id) }}
@endforeach @endif
{{ html()->closeModelForm() }} @endsection