public function show($id, Manager $fractal, AttachmentTransformer $attachmentTransformer) { //show single $record = Attachment::with('user')->where('id', $id)->get(); $collection = new Collection($record, $attachmentTransformer); $data = $fractal->createData($collection)->toArray(); return $this->respond($data); }