/** * 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]); }