@php $notification_count = App\Models\Notification::where('user_id', Auth::user()->id)->where('from_id', '<>', Auth::user()->id)->count(); $tenant = App\Models\User::where('id', Auth::user()->creatorId())->first(); $tenant_setting = App\Models\Setting::where('user_id', $tenant->id)->first(); @endphp
@if($notification->type == 'like_post') @php $feed = App\Models\Feed::where('id', $notification->reference_id)->first(); @endphp {{$notification->description}} @elseif($notification->type == 'like_comment') @php $comment = App\Models\Comment::where('id', $notification->reference_id)->first(); $feed = App\Models\Feed::where('id', $comment->feed_id)->first(); @endphp {{$notification->description}} @elseif($notification->type == 'like_comment_reply') @php $comment_reply = App\Models\CommentReply::where('id', $notification->reference_id)->first(); $feed = App\Models\Feed::where('id', $comment_reply->feed_id)->first(); @endphp {{$notification->description}} @elseif($notification->type == 'comment') @php $comment = App\Models\Comment::where('id', $notification->reference_id)->first(); $feed = App\Models\Feed::where('id', $comment->feed_id)->first(); @endphp {{$notification->description}} @elseif($notification->type == 'comment_reply') @php $comment_reply = App\Models\CommentReply::where('id', $notification->reference_id)->first(); $feed = App\Models\Feed::where('id', $comment_reply->feed_id)->first(); @endphp {{$notification->description}} @elseif($notification->type == 'followed') {{$notification->description}} @endif
@if($notification->type == 'comment') @php $comment = App\Models\Comment::where('id', $notification->reference_id)->first(); $feed = App\Models\Feed::where('id', $comment->feed_id)->first(); @endphp "{{Str::words($comment->comment_body, 10)}}" @elseif($notification->type == 'comment_reply') @php $comment_reply = App\Models\CommentReply::where('id', $notification->reference_id)->first(); $feed = App\Models\Feed::where('id', $comment_reply->feed_id)->first(); @endphp "{{Str::words($comment_reply->comment_reply_body, 10)}}" @elseif($notification->type == 'like_comment') @php $comment = App\Models\Comment::where('id', $notification->reference_id)->first(); $feed = App\Models\Feed::where('id', $comment->feed_id)->first(); @endphp "{{Str::words($comment->comment_body, 10)}}" @elseif($notification->type == 'like_comment_reply') @php $comment_reply = App\Models\CommentReply::where('id', $notification->reference_id)->first(); $feed = App\Models\Feed::where('id', $comment_reply->feed_id)->first(); @endphp "{{Str::words($comment_reply->comment_reply_body, 10)}}" @endif
View all notifications
@endif