/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $searchData = Search::select("*")->join('status_types', 'status_types.id', '=', 'searches.status_id')->where('searches.id', '=', $id)->get(); $searchData[0]['date_of_birth'] = $this->formatDate($searchData[0]['date_of_birth']); $searchData[0]['start_travel'] = $this->formatDate($searchData[0]['start_travel']); $searchData[0]['end_travel'] = $this->formatDate($searchData[0]['end_travel']); $searchData[0]['created_at'] = $this->formatDate($searchData[0]['created_at'], 1); return \Response::json($searchData); }