/** * @param int $id * @return Illuminate\Http\JsonResponse */ public function deleteIndex($id) { try { list($id_passos, $id_fluxo) = explode(',', $id); $this->step->deleteAll($id_passos, $id_fluxo); return $this->getJsonResponse($id); } catch (\Exception $exception) { return $this->getJsonResponse(['data' => $exception->getMessage(), 'error' => true], false); } }