/** * Retrieve note by given id * @param mixed $id * @return Response */ public function show($id) { // Later, make sure resource exist and user is authorized $note = $this->noteRepository->findById($id); if (is_null($note)) { abort(404); } return $this->response->item($note, new NoteTransformer()); }