@extends('layouts.app') @section('content')

{{ label('Create User') }}

@csrf
{{ createText('name', 'name', 'Name', '', $editable ? $data->name : '') }}
{{ createText('email', 'email', 'Email', '', $editable ? $data->email : '') }}
{{ createText('username', 'username', 'Username', '', $editable ? $data->username : '') }}
{{ createPassword('password', 'Password', '', $editable ? $data->password : '') }}
{{ createCustomSelect( 'tbl_roles', 'title', 'role_id', $editable ? $data->roles_id : '', 'Roles Id', 'roles_id', 'form-control select2', 'status<>-1', ) }}
{{ createCustomSelect( 'tbl_branches', 'title', 'branch_id', $editable ? $data->branches_id : '', 'Branches Id', 'branches_id', 'form-control select2', 'status<>-1', ) }}
{{ createCustomSelect( 'tbl_employees', 'title', 'employee_id', $editable ? $data->employees_id : '', 'employees Id', 'employees_id', 'form-control select2', 'status<>-1', ) }}

{{ label('Users List') }}

@php $i = 1; @endphp @foreach ($data as $item) @endforeach
{{ label('Sn.') }} {{ label('Name') }} {{ label('Email') }} {{ label('User Name') }} {{ label('Role') }} {{ label('Branch') }} {{ label('Employee') }} {{ label('Action') }}
{{ $i++ }} {{ $item->name }} {{ $item->email }} {{ $item->username }} {!! getFieldData('tbl_roles', 'title', 'role_id', $item->roles_id) !!} {!! getFieldData('tbl_branches', 'title', 'branch_id', $item->branches_id) !!} {!! getFieldData('tbl_employees', 'title', 'employee_id', $item->employees_id) !!}
@endsection @push('css') @endpush @push('js') @endpush