Exemplo n.º 1
0
 /**
  * @param Ebook $ebook
  * @param int $status
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function status(Ebook $ebook, $status)
 {
     $result = $ebook->updateStatus($status) ? 'success' : 'error';
     return Response::json(['type' => $result, 'content' => trans("common.status_{$result}")]);
 }