• {{ __('Admin') }}
  • {{ __('Help Tickets') }}
  • Help Tickets

    Unsolved Help Tickets

    @if($tickets == "")
    Zendesk Not Configured
    @else @foreach($tickets->results as $ticket) @php $user = null; $subdomain = env('ZENDESKAPISUBDOMAIN'); $username = env('ZENDESKAPIUSERNAME'); $token = env('ZENDESKAPITOKEN'); $client = new \Zendesk\API\HttpClient($subdomain); $client->setAuth('basic', ['username' => $username, 'token' => $token]); $ticket1 = $client->tickets()->sideload(['users'])->find($ticket->id); if(collect($ticket1->users)->where('role', 'end-user')->first()) { $user = \App\Models\User::where('email', collect($ticket1->users)->where('role', 'end-user')->first()->email)->first(); } @endphp
    {{date('M d, Y h:i A', strtotime($ticket->created_at))}} -- @if($user) {{-- {{ucwords(strtolower($user->short_name))}} -- {{$ticket->subject}} ({{$ticket->status}}) --}} {{ucwords(strtolower($user->short_name))}} -- {{$ticket->subject}} ({{$ticket->status}}) @else Not a User -- {{$ticket->subject}} ({{$ticket->status}}) @endif
    {{--
    --}} @endforeach @endif