@extends('adminlte::page') @section('title', 'Staff List') @section('content_header')

Staff List

@stop @section('content') @if(session('success')) @endif

Staff Records

@can('create staff') Add Staff @endcan
@forelse($staffs as $i => $staff) @empty @endforelse
# Name Email Department Position Roles Actions
{{ $staffs->firstItem() + $i }} {{ $staff->name }} {{ $staff->email }} {{ $staff->department?->name ?? '-' }} {{ $staff->position ?? '-' }} {{-- Get roles from related user --}} {{ $staff->user ? $staff->user->roles->pluck('name')->join(', ') : '-' }} @can('edit staff') @endcan @can('delete staff')
@csrf @method('DELETE')
@endcan
No staff found.
@stop