/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index($friend_id)
 {
     //
     $list = FriendComment::where('friend_id', $friend_id)->take(20)->get();
     $this->meta['code'] = 200;
     $this->meta['message'] = 'success';
     return response()->json(['meta' => $this->meta, 'comments' => $list]);
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $friend = Friend::find($id);
     $comments = FriendComment::find($id);
     return view('admin.friends.show', ['friend' => $friend, 'comments' => $comments]);
 }
 public function getAll()
 {
     $comments = FriendComment::orderby('created_at', 'desc')->get();
     return view('admin.friends.comments.index', ['comments' => $comments]);
 }