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

All Staffs

@if (session('err_msg'))
{{ session('err_msg') }}
@endif
@foreach($results as $item) @php $training_name = $locname = "not set"; $oldlocid = "na"; @endphp @foreach( $staff_training_location as $train_location) @if($train_location->staff_id == $item->staff_id ) @php $locname = $train_location->location_name; $oldlocid = $train_location->id ; @endphp @break @endif @endforeach @endforeach
Staff ID Staff Name Email Department Location Training Action
@if($item->photo=="") {{ $item->staff_id }} @else {{ $item->staff_id }} @endif {{ $item->staff_id }} {{ $item->fname . ($item->mname != "" ? " " . $item->fname : "" ) . " " . $item->lname }} {{ $item->email }} @php $deptname = "not set"; $olddeptid = "0"; @endphp @foreach( $staff_depts as $staff_dept) @if($staff_dept->staff_id == $item->staff_id ) @php $deptname = $staff_dept->dept_name; $olddeptid = $staff_dept->dept_id ; @endphp @break @endif @endforeach {{ $deptname }} {{ $locname }} {{ $training_name }} @php $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; $pass = array(); $alphaLength = strlen($alphabet) - 1; for ($i = 0; $i < 8; $i++) { $n = rand(0, $alphaLength); $pass[] = $alphabet[$n]; } @endphp
{{ csrf_field() }}
{{ csrf_field() }}
{{ csrf_field() }}
@endsection @section("script") @endsection