@php $name = $id = 'filEmployeeId'; $label = isset($element['label']) ? $element['label'] : 'Employee:'; $class = 'form-control custom-select2'; if (isset($element['attributes']['class'])) { $class .= ' ' . $element['attributes']['class']; } $attributes = ['id' => $id, 'class' => $class]; if (isset($element['attributes'])) { $attributes = array_merge($attributes, $element['attributes']); } $employees = []; // if (Auth::user()->branchId != 1) { // $employees = DB::table('hr_emp_general_info AS empGnl') // ->join('hr_emp_org_info AS empOrg', 'empOrg.emp_id_fk', 'empGnl.id') // ->where('empOrg.branch_id_fk', Auth::user()->branchId) // ->where([ // ['status', 'Active'], // ['job_status', 'Present'], // ]) // ->select(DB::raw("CONCAT('emp_id', ' - ', )")) // } $options = $employees; if (isset($element['options'])) { $options = $element['options']; } $defaultValue = isset($element['defaultValue']) ? $element['defaultValue'] : ''; @endphp
{!! Form::label($name, $label, ['class' => 'control-label']) !!}
{!! Form::select($name, $options, $defaultValue, $attributes) !!}