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

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


{{ 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() ->autofocus() }}
{{ 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')) ->attribute('maxlength', 191) ->required() }}
{{ html()->label(__('validation.attributes.backend.access.users.password'))->class('col-md-2 form-control-label')->for('password') }}
{{ html()->password('password') ->class('form-control') ->placeholder(__('validation.attributes.backend.access.users.password')) ->required() }}
{{ html()->label(__('validation.attributes.backend.access.users.password_confirmation'))->class('col-md-2 form-control-label')->for('password_confirmation') }}
{{ html()->password('password_confirmation') ->class('form-control') ->placeholder(__('validation.attributes.backend.access.users.password_confirmation')) ->required() }}
{{ html()->label(__('validation.attributes.backend.access.users.active'))->class('col-md-2 form-control-label')->for('active') }}
{{ html()->label(__('validation.attributes.backend.access.users.confirmed'))->class('col-md-2 form-control-label')->for('confirmed') }}
@if(! config('access.users.requires_approval'))
{{ html()->label(__('validation.attributes.backend.access.users.send_confirmation_email') . '
' . '' . __('strings.backend.access.users.if_confirmed_off') . '')->class('col-md-2 form-control-label')->for('confirmation_email') }}
@endif
{{ html()->label(__('labels.backend.access.users.table.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[]', old('roles') && in_array($role->name, old('roles')) ? true : false, $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[]', old('permissions') && in_array($permission->name, old('permissions')) ? true : false, $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()->form()->close() }} @endsection