@auth @php $existingClaim = \App\Models\Claim::where('listing_id', $listing->id)->where('listing_type', $listing->type)->where('user_id', auth()->user()->id)->exists(); @endphp @if (!$existingClaim && auth()->user()->type == 'agent') {{ get_phrase('Claim Listing') }} @elseif (auth()->user()->type != 'agent')

{{ get_phrase('You are not allowed to claim this listing') }}

@else @endif @else {{ get_phrase('Claim Listing') }} @endauth