예제 #1
0
 /**
  * Returns a single item
  * 
  * @param  \Illuminate\Database\Eloquent\Model $object
  * @return \Illuminate\Http\JsonResponse
  */
 public function showByObject($object)
 {
     try {
         return $this->response->withItem($object, new $this->transformerName());
     } catch (ModelNotFoundException $e) {
         return $this->respondNotFound();
     }
 }