@extends('layouts.erp_theme_01') @section('content')
| Staff ID | Staff Name | Department | Location | Training | Action | ||
|---|---|---|---|---|---|---|---|
|
@if($item->photo=="")
|
{{ $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 }} | @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{{ $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 |