@extends('backend.layouts.app') @section('title', __('labels.backend.access.users.management') . ' | ' . __('labels.backend.access.users.edit')) @section('breadcrumb-links') @include('backend.auth.user.includes.breadcrumb-links') @endsection @section('content') {{ html()->modelForm($user, 'PATCH', route('admin.auth.user.update', $user->id))->class('form-horizontal')->open() }}

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


{{ html()->label(__('validation.attributes.backend.access.users.first_name'))->class('col-md-2 form-control-label')->for('first_name') }}
{{ html()->text('first_name') ->class('form-control') ->placeholder(__('validation.attributes.backend.access.users.first_name')) ->attribute('maxlength', 191) ->required() }}
{{ html()->label(__('validation.attributes.backend.access.users.last_name'))->class('col-md-2 form-control-label')->for('last_name') }}
{{ html()->text('last_name') ->class('form-control') ->placeholder(__('validation.attributes.backend.access.users.last_name')) ->attribute('maxlength', 191) ->required() }}
{{ html()->label(__('validation.attributes.backend.access.users.email'))->class('col-md-2 form-control-label')->for('email') }}
{{ html()->email('email') ->class('form-control') ->placeholder(__('validation.attributes.backend.access.users.email')) ->attributes(['maxlength'=> 191,'readonly'=>true]) ->required() }}
{{ html()->label('Abilities')->class('col-md-2 form-control-label') }}
@lang('labels.backend.access.users.table.roles') @lang('labels.backend.access.users.table.permissions')
@if($roles->count()) @foreach($roles as $role)
{{ html()->label( html()->checkbox('roles[]', in_array($role->name, $userRoles), $role->name) ->class('switch-input') ->id('role-'.$role->id) . '') ->class('switch switch-label switch-pill switch-primary mr-2') ->for('role-'.$role->id) }} {{ html()->label(ucwords($role->name))->for('role-'.$role->id) }}
@if($role->id != 1) @if($role->permissions->count()) @foreach($role->permissions as $permission) {{ ucwords($permission->name) }} @endforeach @else @lang('labels.general.none') @endif @else @lang('labels.backend.access.users.all_permissions') @endif
@endforeach @endif
@if($permissions->count()) @foreach($permissions as $permission)
{{ html()->label( html()->checkbox('permissions[]', in_array($permission->name, $userPermissions), $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