public function postDelete(Request $request) { $centrocosto = CentroCosto::findOrFail($request->input("_id")); $centrocosto->delete(); return redirect("centrocosto")->with('success', 'delete'); }