@php
    $history = \App\Models\CaseHistory::where('case_id',$cases->id)->orderBy('id','desc')->first();
    $user_id = \App\Models\IUser::where('email',$email)->first();
    if($user_id){
      $queues_user = \App\Models\QueueUsers::where('user_id',$user_id->id)->first();
      if($queues_user){
        $queue = \App\Models\Queue::where('id',$queues_user->id)->first();
      }
    }
  @endphp
  CASE #{{$cases->id}} has been updated by {{$history->user_data}}.
  @if($history->description)
  {!! $history->description !!}
  @endif
  @if($history->note)
  * Note {!! $history->note !!}
  @endif
  
  ----------------------------------------
  {{$cases->type_of_case_data}} #{{$cases->id}}: {{$cases->name}}
    {{env('APP_URL')}}/{{$link}}
  
  * Author: {!! $cases->owner_data !!}
  * Priority: {!! $cases->getPriorityStatus() !!}
  @if($cases->organization_data)
  * Organization: {!! $cases->organization_data !!}
  @endif
  * Service: {!! (\App\Models\Service::where('id',$cases->service_id)->first())?\App\Models\Service::where('id',$cases->service_id)->first()->short_name : '-' !!}
  @if($cases->billable)
  * Billable: {!! $cases->getBillableStatus() !!}
  @endif
  @if($cases->case)
  * Cause: {!! $cases->case !!}
  @endif
  * Status {!! $cases->getStatus() !!}
  @if($cases->assigned_user_data)
  * Assignee: {!! $cases->assigned_user_data !!}
  @endif
  ----------------------------------------
   
  You have received this notification because you have either subscribed to it, or are involved in it.