/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $string = String::findHashidOrFail($id); if (count($string) > 1) { return $this->response->collection($string, new StringTransformer()); } return $this->response->item($string, new StringTransformer()); }