/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { Tarefa::destroy($id); return Response::json(array('success' => true)); }
/** * Remove the specified tarefa from storage. * * @param int $id * @return Response */ public function excluir($id) { Tarefa::destroy($id); $alert[] = ['class' => 'alert-success', 'message' => '<strong><i class="fa fa-check"></i></strong> Tarefa excluída com successo']; Session::flash('alerts', $alert); return Redirect::to(URL::previous()); }