@props([ 'user' ]) @if ($user) @can('view', $user) @if(! $user->trashed()) {{-- if the user is in database, the viewer CAN see them, and the user is not deleted --}} {{ $user->display_name }} @else {{-- if the user is soft deleted, but the viewer can see them, add a strikethrough --}} {{ $user->display_name }} @endif @else @if(! $user->trashed()) {{-- if the user is in database and not soft-deleted --}} {{ $user->display_name }} @else {{-- if the user exists but is deleted and the viewer cannot click through to see their details --}} {{ $user->display_name }} @endif @endcan @endif