@extends('layouts.app') @section('title', 'Tickets') @section('content')

Tickets

@auth @if(auth()->user()->hasPermission('create-tickets')) New Ticket @endif @endauth
@if($tickets->count() > 0)
@foreach($tickets as $ticket)
{{ ucfirst(str_replace('_', ' ', $ticket->status)) }} {{ ucfirst($ticket->priority) }}
{{ $ticket->title }}

{{ Str::limit($ticket->description, 100) }}

{{ ucfirst(str_replace('_', ' ', $ticket->category)) }}
Created by: {{ $ticket->user->name }}
Created: {{ $ticket->created_at->format('M d, Y H:i') }}
@if($ticket->assignedTo)
Assigned to: {{ $ticket->assignedTo->name }}
@endif
@endforeach
{{ $tickets->links() }}
@else

No tickets found

You haven't created any tickets yet.

@auth @if(auth()->user()->hasPermission('create-tickets')) Create Your First Ticket @endif @endauth
@endif @endsection