/** * Store a newly created resource in storage. * * @return JsonResponse */ public function store() { try { $task = $this->task->create($this->request->all()); } catch (PDOException $e) { return $this->response->internalError(); } return $this->response->ok($task); }