@extends('layouts.landing') @section('title') Notifications @endsection @section('content')
@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