@extends('admin.layouts.app') @section('title', 'Departments') @section('breadcrumb') / Departments @endsection @section('content')
Reset
All Departments
{{ $departments->total() }} total
@forelse($departments as $i => $dept) @empty @endforelse
S.N. Department Name Description Users Status Created Actions
{{ ($departments->currentPage()-1)*$departments->perPage() + $i + 1 }}
{{ $dept->name }}
{{ $dept->description ? Str::limit($dept->description, 60) : '—' }} {{ $dept->users_count }} users
status === 'active' ? 'checked' : '' }} data-id="{{ $dept->id }}" data-url="{{ route('admin.departments.toggle-status', $dept) }}" @if(!auth()->user()->hasPermission('departments.edit')) disabled @endif>
{{ $dept->created_at->format('d M Y') }}
@if(auth()->user()->hasPermission('departments.edit')) @endif @if(auth()->user()->hasPermission('departments.delete')) @endif

No departments found

@if(auth()->user()->hasPermission('departments.create')) Add First Department @endif
@if($departments->hasPages()) @endif
@endsection @push('scripts') @endpush