@php $allowedDepartments = collect($permissions)->pluck('department')->toArray(); @endphp