function hapus($id) { $data = Pengurus::find($id); if ($data->delete()) { echo "ok"; } else { echo "error"; } }