@extends('layouts/contentNavbarLayout') @php $facultyPayload = $faculties ->sortByDesc(function ($faculty) { return $faculty->created_at ?? $faculty->id ?? 0; }) ->map(function ($faculty) { $facultyUser = optional($faculty->user); return [ 'id' => $faculty->id, 'user_id' => $faculty->user_id, 'employee_no' => $faculty->employee_no, 'department' => $faculty->department, 'job_title' => $faculty->job_title ?? $facultyUser->job_title, 'user' => [ 'id' => $facultyUser->id, 'name' => $facultyUser->name ?? $faculty->name ?? 'Unknown', 'email' => $facultyUser->email, 'job_title' => $facultyUser->job_title, ], ]; })->values(); $userOptions = $users->map(function ($user) { return [ 'id' => $user->id, 'name' => $user->name ?? 'Unknown', 'email' => $user->email, ]; })->values(); $container = 'container-xxl'; @endphp @section('title', 'Data Management - Faculties') @section('page-style') @endsection @section('page-script') @include('components.table-controller-script') @endsection @section('content') @php $flashSuccess = session('success'); $flashError = session('error'); $pageToasts = []; if ($flashSuccess) { $pageToasts[] = ['type' => 'success', 'message' => $flashSuccess]; } if ($flashError) { $pageToasts[] = ['type' => 'danger', 'message' => $flashError]; } @endphp @include('components.dm-toast', ['messages' => $pageToasts])
Use the actions above to add, update, or import faculty records.
| Faculty Name | Employee No. | Department | Job Title | Actions |
|---|