@forelse (auth()->user()->notifications as $notification)
@php $brandRejectionReason = $notification->data['reason'] ?? ''; $userName = $notification->data['user'] ?? ''; $getNotify = $notification->data['message'] ?? ''; // Detect if there's an anchor tag in the message $hasAnchor = stripos($getNotify, ']+)["\']?/', $getNotify, $matches); if (isset($matches[1])) { $url = $matches[1]; } // If you want to get part before "url" word, fix this: $notificationMessage = strstr($getNotify, 'url', true); // gets string before "url" } else { $notificationMessage = null; } @endphp
@if(isset($notificationMessage) && trim($notificationMessage) == "You can give review and rating by this button.") {{ trim($notificationMessage) }} @else {!! $getNotify !!} @endif
{{ $brandRejectionReason }}
{{-- Show button only if anchor exists --}} @if($hasAnchor)
Add Review
@endif

{{ $notification->created_at->diffForHumans() }}

@empty($notification->read_at) @endempty
@if(empty($notification->data['is_brand']) || $notification->data['is_brand'] != 1) {{ __("words.View Details") }} @endif @if (!empty($notification['reply_button'])) @endif
@empty {{ __("words.There are no new notifications") }} @endforelse