@extends('layouts.admin.layout') @section('content') @php $isAdmin = auth()->user()->usergroup_id == 3; @endphp {{-- Page header --}}

Groups ({{ $count }})

@if($isAdmin || Auth::user()->hasPermission('create-groups')) Create Group @endif
@include('partials.message')
{{-- Search bar --}}
@if(request('search')) Reset @endif
@if($groups->isEmpty())

No groups yet.

@else
@foreach($groups as $group) {{-- Cover thumbnail --}} {{-- Name --}} {{-- Description --}} {{-- Category --}} {{-- Type --}} {{-- Actions --}} @endforeach
Name Description Category Type Actions
{{ $group->name }} {{ $group->name }} {{ \Str::limit($group->description, 60) ?: '—' }} {{ optional($group->groupCategory)->name ?? '—' }} @if($group->group_type) {{ $group->group_type }} @else @endif
View @if($isAdmin || Auth::user()->hasPermission('create-groups')) Edit
@csrf @method('DELETE')
@endif
{{-- Pagination --}} @if($groups->hasPages())
{{ $groups->links() }}
@endif @endif
@endsection